Already tried with $(window) or $(document) they're not working either.
$('a[href^="#"').on('click', function () {
var id = $(this).attr("href");
var target = $(id).offset().top;
//Animation
$('body,html').animate({ scrollTop: target }, 500);
return false;
});
Aucun commentaire:
Enregistrer un commentaire