jquery - Loading Dynamic Touchscroller page Externally -


greetings trying load dynamically generated (php) touchscroller page index.html file phonegap app.

thomas kahn's cool jquery plug-in code here: http://smoothtouchscroll.com/

in addition loads these resources, of on server:

 <link rel="stylesheet" type="text/css" href="css/smoothtouchscroll.css" />  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">  </script>  <script src="js/jquery-ui-1.10.3.custom.min.js">  </script>  <script src="js/jquery.kinetic.min.js">  </script>  <script src="js/jquery.smoothtouchscroll.min.js"> 

have tried jquery load , methods , vanilla javascript xmlhttp response-innerhtml request, images come disjointed , there no scrolling effect.

going dynamically generated php page directly (echoing full code resources) generates working touchscroller, know loaded page works, leaves me thinking may timing issue. know doing wrong?

question solved! answered own question, in fact timing thing , needed callback touchscroll function after successful response, this:

 $("#touchscroller").load("sts.php", function(responsetxt, statustxt, xhr){   if(statustxt == "success"){  $(function(){  $("#touchscroller").smoothtouchscroll({ continuousscrolling: true });  });  }   }); 

i swear, putting question words helps clarify thoughts , find answer. hope helps other phonegappers myself have integrate dynamic (php+jquery) content regular html page.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -