last day (15 days later) » 

1:19 AM
-2
Q: Fancybox javascript help and links

S NThe problem is I want to open fancybox with my navigation link 'about' but the 'about' fancybox automatically appears on my page once I open my website. When I close the fancybox then click my 'about' link again, the fancybox no longer is at its fixed width and height and there are scrollbars whi...

 
just wondering why the scrollbars were displayed on your page as the iframe scrolling no part was already there as I just noticed.
 
S N
I don't know what you mean.. I had copied your script from Update: Adjust to have multiple content Fancyboxes on one page. the links work but I'm not sure if I add js correctly for the galleries.
 
just some minutes, I'm checking it on fiddle. what isn't working for you? you still have scrollbars?
 
S N
My galleries fancy box are not iframes . They are plain fancybox. could that be the error? yeah there are still scrollbars
If I give you my script, could you add your script from fiddle? I'm not sure I add it correctly.?
 
just checked it on fiddle, the only thing that was wrong (at least for the fiddle-example) was the padding: 0 cause the frames were not displayed correctly. and the part in your suggest. edit which was wrong was that you didn't have the scrolling: 'no' in the iframe: { } option, there was only preload: true
about the fiddle - that's a diff example, and it's not wrapped in document.ready because fiddle already has that included; so maybe you just take the fiddle part from update jsfiddle.net/matthias_h/vkDcG/2255 and remove the // on top and bottom for the doc.ready; and the line with the attr('rel') before the .fancybox as you don't have that
and just in case of misunderstanding - as your first example was using iframes - your current problem is to display fancybox without iframe and this fancybox displays scrollbars?
 
S N
1:19 AM
yes all true...
 
ok.. than you have a gallery with no iframe, but scrollbars. another fiddle: jsfiddle.net/matthias_h/vkDcG/2259 i just added maxwidth and maxheight (height and width are only for iframes); is this what it should look like?
nearly correct; problem is just that you have 2 fancybox calls for the same .fancybox class, one with iframe, one without; 2nd one should be gallery, so it should work like this: rename the class fancybox for the gallery-fancybox a-href into something else, e.g. fancyboxgallery, and if not already done delete the 2nd class fancybox.iframe (which looks like misspelled for a classname); adjust the 2nd fb-call to $(".fancyboxgallery").attr('rel', 'gallery').fancybox(.. ; and for the iframe fb add the scrolling : 'no'
almost. the scrolling : 'no' has to be in the iframe settings ( = iframe: {preload : true, scrolling: 'no'}; would be good if you also add in your question the 2nd li with the <a class="fancyboxgallery">, just to have it complete
happens.. if unsure with brackets, just paste it in the js field in fiddle and click tidy up, than it's easier to read
 
S N
it fixed the scrolling problem but the image is still cut off because it is too big for the fb. it still won't fit to fancybox??
 
when you use the data-width and -height attributes, just enter there the correct values of the images. these values will be the maxHeight and maxWidth of the fb
 
S N
the new script did nothing....
 
have to leave for now, really late here. I suggest you update your question to the current setting and I'll have a look tomorrow in case it's still not working; or you create a fiddle-account as it's free and save it there, would be easier ;) good luck, maybe you'll get it working properly in some minutes.
 
S N
1:19 AM
ok thanks........
 
 
19 hours later…
8:31 PM
in case it's still not working just write here, don't know if it works cause normally this works only for ppl with some more reputation; therefore the suggestet link with "pls move this discussion into chat" didn't work for me, guess some admin with enough rep moved it here which is better
 

last day (15 days later) »