Jquery Fancybox not working after postback

Posted by Lee Englestone on Stack Overflow See other posts from Stack Overflow or by Lee Englestone
Published on 2009-09-25T13:13:10Z Indexed on 2010/04/27 5:23 UTC
Read the original article Hit count: 863

Filed under:
|
|
|

I have a Fancybox (or more accurately) a number of fancy boxes on an asp.net page.

My Fancybox (jquery plugin) works fine until a postback occurs on the page then it refuses to work.

Any thoughts? Anyone experienced similar behaviour?

UPDATE : Some Code..

I have a databound repeater with a fancybox on each repeating item.

They are instanciated by (outside the repeater)

$(document).ready(function() {
            $("a.watchvideo").fancybox({
            'overlayShow': false,
            'frameWidth' : 480,
            'frameHeight' : 400
            });
        });

The anchor tag is repeated..

href="#watchvideo_<%#Eval("VideoId")%>"

As is a div with

id="watchvideo_<%#Eval("VideoId") %>

As is a script element that instanciates the flash movies

Yes the VideoIds are being output the the page.

UPDATE : It's not a problem with the flash..

It is not a problem with the flash as i've tried it without the flash, it wont even pop a window with a simple message in.

UPDATE : I wonder if it is the updatepanel.

http://stackoverflow.com/questions/301473/rebinding-events-in-jquery-after-ajax-update-updatepanel

-- lee

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-plugins