when i click button, always load same page in my mobile. it's only happen mobile phone. desktop and tablet, it's work grate. please help.
<a href="#a2" class="nav-btn">Next</a><a class="rest nav-btn">Reset</a>
$('a[href*=#a2]').click(function(e){
var link = "#b11"
gotoSection(link);
//console.log(link);
});
function gotoSection(temp){
var location = temp.split("#");
$('div').find('h1').each(function( index ) {
if($(this).data('url')==location[1]){
var parent = $(this).parent();
$('html, body').animate({scrollTop: $(parent).offset().top-70}, 1000);
}
});
}
this is the code ..
thank you.
Aucun commentaire:
Enregistrer un commentaire