Animation not working with different HTML markup

Cleplecix

New Member
I have a jQueryMobile HTML markup which is working, When i try to make it work with the different HTML markup which i will be using animation is not working i tried to use different jQuery methods & function to make it work. nothing seems to be workingWorking Example http://jsfiddle.net/yVtVe/22/Need to implement same for http://jsfiddle.net/yVtVE/25/\[code\]childrenvar stopAnim = false;function animateTitle(scrollingWidth, initialOffset,elem){ if(!stopAnim ){ var $a = elem; $a.animate({left: (($a.offset().left == (scrollingWidth + initialOffset ))?-initialOffset:("-="+scrollingWidth))}, { duration: 5000, easing: 'swing', complete: function(){ if($a.offset().left < 0){ $(this).css("left", scrollingWidth); } animateTitle(scrollingWidth); } }); }}$('#swrapper ul li').hover( function () { var scrollingWidth = $(this).children('div.list-heading').children('h2').width(); alert(scrollingWidth); var elem = $(this).children('div.list-heading').children('h2'); if(scrollingWidth > 330){ scrollingWidth = scrollingWidth + 10; var initialOffset = $(this).children('div.list-heading').children('h2').offset().left; stopAnim = false; animateTitle(scrollingWidth, initialOffset,elem); } }, function () { stopAnim = true; $(this).children('div.list-heading').children('h2').stop(true, true).css("left", "0"); });\[/code\]
 
Back
Top