In my mobilejquery project, I need to unbind the links (hrefs), and bind them a point, for that, I use this code:
$(document).bind('pageinit', function () {
$('a[href="#"], a.disabled').bind('click',function (e) {
e.preventDefault(); //sets all dynamic href to prevents wrong url
} )
});
but not at all works... anything wrong with my code?
Additional question..
I don't want to show the url path in the navigator.. is there any way to make the url path not to show?
did you try using the unbind() method?
$('a[href="#"], a.disabled').unbind("click").bind('click',function (e) {
e.preventDefault(); //sets all dynamic href to prevents wrong url
} )