Refresh a jQuery function
        Posted  
        
            by 
                Toro
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Toro
        
        
        
        Published on 2011-02-04T23:13:37Z
        Indexed on 
            2011/02/04
            23:25 UTC
        
        
        Read the original article
        Hit count: 362
        
Is possible refresh a function every x seconds or refresh it on single event?
I explain:
I have a function that make pagination on my website, inside every div that are "pages" I have some pictures where I have added LightBox.
Everything works nice on the first div (page) but when I change the page it doesnt' work anymore.
I tried to fix in this way:
$('.pagination a').click(function () {
    initShadow();
});
In this way it work on the pageLoad and on the first page that I change, than it stop again.
So I need to fix this issue, everytime I change the "page" I would like it works fine.
Is possible to refresh a function every x second or to refresh it everytime I click on the pagination buttons?
© Stack Overflow or respective owner