ハッシュタグの遷移が機能しません、何かアイデアはありますか?
私は持っています:
//Hash tag animations
$(document).ready(function(){
$('#selectcitydd').localScroll({duration:800, hash:true});
});
そして、これは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>
このjqueryを使用してselecturlをトリガーします。
// 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;
});
});