javascript - Slider run in offline/localhost but not run in online/server -


i write javascript code slider. code run in localhost or offline. not run in online or server. use code. please me. try not solve it. wrong?

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>         <script type="text/javascript">             var imagecount=1;             var total=5;              function slide(x){                 var image = document.getelementbyid('img');                 imagecount = imagecount + x;                 if(imagecount > total)                     {                         imagecount=1;                     }                 if (imagecount < 1)                      {                         imagecount = total;                     }                 image.src = "img/image" + imagecount + ".jpg";             }             window.setinterval(function slidea(){                 var image = document.getelementbyid('img');                 imagecount = imagecount + 1;                 if(imagecount > total)                     {                         imagecount=1;                     }                 if (imagecount < 1)                      {                         imagecount = total;                     }                 image.src = "img/image" + imagecount + ".jpg";             },5000);         </script> 


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -