called a page in jqtouch using ajax, now want to run javascript?

363 Views Asked by At

Just like in the kitchensink demo, I'm calling outside .html pages in from the index page using jqtouch, and that's working fine. There's video on the outside .html page, and I'm using submlime player to run it. The whole thing is very vanilla - but I need to be able to run the javascript inside that new .html page to run the video.

So on my index page, the code that uses ajax to pull in the new page:

<li class="arrow"><a href="videopage.html">play the video</a><small class="counter">2</small></li></li>

And on the videopage.html, I have:

<script type="text/javascript" src="http://cdn.sublimevideo.net/js/pagbioaz.js"></script>

I'll be using lots of videos - is it possible to run something before that just takes care of it always? Or what can I do on the index page to make it go?

Thanks!

1

There are 1 best solutions below

0
On

I think you can put the pagbioaz.js link in index.html and use jqt's $(document.body).bind('pageInserted'... ) to fire whatever code you need to run.