javascript - Jquery only fires, upon inspection of the core element and or use of the orientation detection in mobile and tablets. -


i have implemented gallery/slideshow webpage, seen here (www.scandalband.co.uk). have come accross issue don't know how correct. jq not strong yet think problem related to,

$(document).ready. 

as mentioned int title slider fires when inspect core element affected jq i.e. slider. or alternativly use orentation detection on mobiles , tablets. can solve problem using document.onload rather document.ready. when use onload, first image in slideshow slider locks completely.

i have provided affected code

<!-- ꜜꜜ slider initilizer ꜜꜜ -->     <script>     $(document).ready(function(){           // slider swipe function          slider = $('#slider').swipe({               auto: 3000,               continuous: false           }).data('swipe');        $('.next').on('click', slider.next);     $('.prev').on('click', slider.prev);     });      </script> 

any appreciated.

try , lemme know , joined these scripts in <head> of page

    <script type="text/javascript">         $(document).ready(function() {            $('#wrapper').hide().delay(500).fadein("slow");           if (screen.width<800) {                       window.location="mobile.html";                   }         // slider swip function           slider = $('#slider').swipe({                   auto: 3000,                   continuous: false         }).data('swipe');            $('.next').on('click', slider.next);          $('.prev').on('click', slider.prev);    });   </script>  

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -