0
votes

I am using tinyscrllbar() plugin and it works fine out of fancy box. when I put the div inside fancybox only the track image is shown and the rest of the scrollbar does not show and apparently it does not function at all. Is there any solution to make tinyscrollbar() work inside fancybox?

1
try initializing the tinyscrllbar() using the fancybox's. afterShow callback. - JFK
OMG !!! you rock ... I had tried onComplete and afterLoad with no luck but you solved the problem , many thanxxxx - GOLNAZ H
I know you are expert in jquary but would you explain why fancybox need to use scrollbar plugin like this? since I used other jquary plugins in fancybox and initialized them out of fancybox and they worked fine. BTW put your answer please so I can vote it :) - GOLNAZ H
thanks, and please meta.stackexchange.com/a/5235 - JFK

1 Answers

2
votes

try initializing the tinyscrollbar() using the fancybox's. afterShow callback.

why? because when you initialize tinyscrollbar at page load, fancybox doesn't exist in the DOM (tinyscrollbar will be init for the existing elements in the document only).

Once you have added fancybox to the DOM, tinyscrollbar re-initialization is required to work inside fancybox.