Wpis z mikrobloga

Dlaczego jak dodam jQuery mobile do strony

to przestaje mi działać skrypt taki:

$(document).ready(function(){

$('.gotop').click(function(e){
e.preventDefault();
var href=$(this).attr('href');
if(!href.match(/#/)){
window.location.href = href;
}

var fromtop = $(href).offset().top-64;

$('html, body').animate({
scrollTop: fromtop
}, 1000, function(){
});
});

});

Bez tego działa, a potrzebuję to jQuery mobile i potrzebuję również żeby działał ten skrypt..

#webdev #javascript #jquery
  • 3
  • Odpowiedz
  • Otrzymuj powiadomienia
    o nowych komentarzach

@qwertyu: SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'osiedle-html/index.html' cannot be created in a document with origin 'null' and URL 'osiedle-html/index.html'.

Tylko coś takiego jest, nic więcej.
  • Odpowiedz