On the site I am working on, I have a fancy box that loads the page which is hidden content Displays & lt; Div & gt;
, but for any reason, any option like height, width, etc. is being ignored, I need to be able to use the 'callbackOnShow:' option because I have some click ()
My code is as follows, and within it is a document ready work:
I placed a height of 5000 as an exam because nothing is working.
// Click the fancy box ($ ('link () (length) {$ (' # link ') (function () {$ (' # link '). Fancybox ( {'Scrolling': 'no', 'hidth': 5000, 'height': 465, 'content': $ ("# lightbox-content"). Html ()})}};} $ ("# link" Fancybox (.) Trigger ('click'); Any ideas why it will not work as expected
Thanks, Dave
Update code : '' No ',' width ': 5000,' height ': 2000,' callback antonio ': function () {warning (' hello ');},' content ': $ ("# Lightbox-content") .html ()}) .triver (' Click ');
This will not make the faxbox again, So when you will call $ ("# link"). Fancybox ()
You are creating a fancybox with default options OK ... then specify options By doing this you will not override the default already used.
To get to whatever you want, provide the option at the time you are calling it:
$ ("# link"). Fancybox {'Scrolling': 'no', 'width': 5000, // hidth was, make sure to fix this 'height': 465, 'content': $ ("# lightbox-content"). Html ()}) .trigger ('click');
In addition, there is no .length
check in jQuery, if it finds elements, then it does something, if it does not, then it does not It will be done internally as part of how this jQuery chaining works.
Comments
Post a Comment