Jquery scripts with jquery mobile transition
I have a site with multiple pages. I use jquery mobile for the page transition between pages.
The transitions are working fine but the jquery scripts that I use on that linked page like masonry and royalslider don't work anymore when the second page is loaded.
I Know I have to use a pageinit Instead of $(document).ready(). When I use "$(document).live('pageshow',function(event) {alert("test");}); The alert will work on the second page. But when I put the code for calling the scripts(masonry and royalslider) in it. The scripts don't work. When I reload that same page, they work.
What is the best way to make scripts on a second page work when that page is linked using jquery mobile transition?