user1288817
user1288817

Reputation:

jquery script not working on iPad

I have the following jquery script on my web page and it works fine on laptop/desktop browsers.

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.1.min.js"></script>
<script src="sharrre/jquery.sharrre-1.3.4.js"></script>
<script src="js/video-js/video.js"></script>

<script type="text/javascript">
$(document).scroll(function () 
{
if($(this).scrollTop() < 1000) {
$(".socialshare-test").fadeIn(200);
 } else {
$(".socialshare-test").fadeOut(200);
}
});
</script>

The problem is that it stops working on the iPad. Is there anything I need to add to make it work?

Upvotes: 1

Views: 1162

Answers (1)

EnterJQ
EnterJQ

Reputation: 1014

 <script type="text/javascript">
 $(function ()
 $(document).scroll(function () 
  {
   if($(this).scrollTop() < 1000) {
   $(".socialshare-test").fadeIn(200);
   } else {
   $(".socialshare-test").fadeOut(200);
 }
 }); 
 });
 </script>

Upvotes: 2

Related Questions