denis_sianto
New Member
I have the following script, loaded to the head of a worpress template, It should update the content of a div called: "right_quote". But even though the content within the array is updated, and I can see it in the javascript console of chrome, I cant see the change in the page itself.the code:\[code\] <script>Adverb_slider = function(interval){ //get all the adverbs data: var adverbs_array = new Array() $('ul#adverbs li').each(function(index){ adverbs_array[index] = $(this).text(); }); var count = 0; var total = adverbs_array.length-1; automate_slide_adverbs = function(){ // why doesnt it work????????????????????? console.debug($("#right_quote").html()); //this works! - I see the content in the console! $("#right_quote").html(adverbs_array[count]); // this doesnt work! I dont see the change in the page! ??? count+=1; if (count == total){count=0} } //automate_slide_adverbs setInterval(automate_slide_adverbs, interval); }</script><ul id = "adverbs" style='display:none;'> <?php $adverbs = new WP_Query(); $adverbs->query('category_name=top_adverb'); while ($adverbs->have_posts()) : $adverbs->the_post(); ?> <li> <?php the_content();?> </li> <?php endwhile; ?></ul>\[/code\]