jquery carrousel plugin not working when i add items dynamically from xml file -


i'm trying add items dynamically carousel jquery plugin.the items added bt carousel ignores them.

the carousel take items show this:

<div class="viewport">     <ul class="overview">         <li><img src="images/picture6.jpg" /></li>         <li><img src="images/picture5.jpg" /></li>         <li><img src="images/picture4.jpg" /></li>                           <li><img src="images/picture2.jpg" /></li>         <li><img src="images/picture1.jpg" /></li>     </ul> </div> 

i'm reading xml file , addings item overview ul.

  $(document).ready(function(){     $.ajax({         type: "get",         url: "categories.xml",         datatype: "xml",         success: xmlparser     });   });  function xmlparser(xml) {     $(xml).find('categories').eq(0).find('category').each(function () {         $(".overview").append('<li><img src="images/picture6.jpg" /></li>');     }); } 

if open source code can see new items inside ul carousel acts there original ones.

why happening this?

the sample i'm working on : http://demos.koalamedia.es/example/

you need re-initiate carousel once new images have been added.

try changing ajax function this:

$.ajax({     type: "get",     url: "categories.xml",     datatype: "xml",     success: function() {         xmlparser();         $('#slider1').tinycarousel();     } }); 

Comments

Popular posts from this blog

Javascript line number mapping -

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -