Chrome mobile problem with "animate"!
Hi!
I've got a problem only on Chrome Browser MOBILE! The first 2 elements "photo1" and "text1" everythig works fine! Also when i start to scroll, "text2" works fine, the problem is when "photo2" start its own animation; infact when it starts, the browser scroll to top automatically!!! Can you tel me why?
Code here >:
- jQuery(window).load(function () {
- jQuery('#photo1').css('margin-left', '-350%');
- jQuery('.text1').css('margin-right', '-350%');
- jQuery('#photo1').animate({marginLeft:'0%'},1000);
- jQuery('.text1').animate({marginRight:'0%'},1300);
-
- jQuery('photo2').css('margin-right', '-350%');
- jQuery('text').css('margin-left', '-350%');
-
- jQuery(window).scroll(function(){
- if (jQuery(window).scrollTop() > 400 ){
- jQuery('text2').animate({marginLeft:'0%'},1000);
- jQuery('#photo2').animate({marginRight:'0%'},1300);
- }
- });
-
- });
Thank you very much for your help!