Lightbox is getting closed on click.how can i prevent it?
i am facing a problem while making my website. i have used lightbox for the description. And the prob开发者_Go百科lem is that on any click anywhere it is getting closed which i don't want as that light box contains few links.
Any help would be appreciated. Thanks in advance, Megha.
You should check your code for a onclick event on the body tag, generally we hide lightbox when anything in clicked in document, moreover, you would not want lightbox to be closed when user click on the lightbox instead, you should try to stop propagation of events to parent elements from lightbox for this.
Bit difficult to help you with the information given.
Which lightbox are you using?
If the lightbox is calling html and will most probably call an iframe which excludes the click event to close the lightbox on parent.
Did you custom code your close event? If so change your close event to just the 'close' button, OR add event.stopPropagation();
when calling it on your parent's body tag.
It is all I can think of with the given information.
精彩评论