This is a migrated thread and some comments may be shown as answers.

How to add javascript events?

1 Answer 8 Views
LightBox
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 09 Oct 2015, 04:19 PM
I want to use the lightbox as a way for users as a way to select the image they want ​from the light box.  I thought this would help: http://www.telerik.com/forums/close-lightbox-on-image-click . However, that seems to create just a single item with a single image, and I need the javascript to apply to every image. Can this be done?

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 14 Oct 2015, 10:00 AM
Hi Paul,

The forum post you are referring to illustrates the approach for one image. However, you can apply the same onclick handler to multiple images.

You can iterate through the images that would be shown in the RadLightBox and add the client-side logic for closing the preview.

Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
LightBox
Asked by
Paul
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or