Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

THIS WORKS:

<script type="text/javascript">
    function fadeReview() {
      jQuery(".reviewPanel     .reviewPanel2:hidden:first").fadeIn(500).delay(3000).fadeOut(500, function() {
    jQuery(this).appendTo(jQuery(this).parent());
    fadeReview();
    });
    }
    fadeReview();
 </script>

BUT, THIS DOES NOT WORK:

<script type="text/javascript">
function fadeReview() {
  jQuery(".reviewPanel .reviewPanel2:hidden:first").fadeIn(500).delay(3000).fadeOut(500, function() {
jQuery(this).appendTo(jQuery(this).parent());
fadeReview();
});
}
fadeReview();

function fadeReviewName() {
  jQuery(".reviewName .reviewName2:hidden:first").fadeIn(500).delay(3000).fadeOut(500, function() {
    jQuery(this).appendTo(jQuery(this).parent());
    fadeReviewName();
  });
}
fadeReviewName();
</script>

Does it have to do with running two functions? It works ok in this fiddle.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

"Won't work" doesn't say much. Use Firebug with Firefox, or in Chrome or Safari or IE8, use the developer tools to check for JS errors on your site.

WP3.2 now includes jQuery 1.6 and your jsfiddle example uses 1.4, so there's a possible conflict.

share|improve this answer
    
OK Thanks. The fiddle works with 1.6...but I will take a look with firebug. –  Carson Jul 21 '11 at 14:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.