slider - Start slide with URL -


i need go slide 5 url. when type url.com/#slide5 or /?start=slide5 code "startslide: 5," needs triggered.

$(document).ready(function(){   $('.slider').bxslider({     slidewidth: 300,     minslides: 2,     maxslides: 3,     startslide: 5,     slidemargin: 10   }); }); 

is possible somehow?

you can use window.location.hash

$(document).ready(function(){   var hash = window.location.hash;    $('.slider').bxslider({     slidewidth: 300,     minslides: 2,     maxslides: 3,     startslide: hash,     slidemargin: 10   }); }); 

but have add slide number hash e.g. url.com/#5 or apply logic strip slide number hash.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -