I wonder why link doing nothing if I click on it and select close automatically just right after it was opened.
Here is my jsFiddle
To call fancybox window automatically, I use this code: $('#task').fancybox().trigger('click');
How to fix it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are getting confuse about the use of fancybox.
First, you need to set the
class="fancybox"to the anchor<a>, not to the<div>parent container of both, the anchor and the target (select).Second, the target should be a different element, not the root (this
href="/"doesn’t make sense in your case), which contains the launcher and the target.Third, it would be a good idea to set the proper html structure to the
selectelement, which is inside of aformtag.See this forked fiddle for a working sample.