My hash tag transition doesn’t work, any ideas?
I have:
//Hash tag animations
$(document).ready(function(){
$('#selectcitydd').localScroll({duration:800, hash:true});
});
And this should be triggered by select:
<select id="selectcitydd">
<option selected="selected" value="http://localhost/wordpress/#afterheadindex">Tbilisi</option>
<option value="http://localhost/wordpress/gudauri/#afterheadindex">Gudauri</option>
<option value="http://localhost/wordpress/batumi/#afterheadindex">Batumi</option>
</select>
I use this jquery to trigger select url:
// Homepage Select City function
$(document).ready(function() {
// bind change event to select
$('#selectcitydd').on('change', function () {
var url = $(this).val(); // get selected value
if (url) { // require a URL
window.location = url; // redirect
}
return false;
});
});
Did you try?
I guess by doing
you tell the plugin to scroll on
#selectcityddinstead of the window.So to preserve the duration you specified you’d have to write it like
I never actually used it, but just checked out the sample on the GitHub repo.