javascript - Changing href attribute doesn't work in jQuery Mobile -


i change href using jquery mobile, tried code examples like:

$("a[href='http://www.google.com/']").attr('href', 'http://www.live.com/'); 
<li><a data-ajax="false" href="http://www.google.com" >navigate</a></li> 

and

$("#address").append("href", "http://cupcream.com"); 
<li><a data-ajax="false" id="address" href="http://www.google.com" >navigate</a></li> 

but nothing happens.

what can wrong, aren't bug in jquery mobile?

you need add "a" element attribute rel="external" or data-ajax="false", in order links not managed via ajax. official documentation here.

also @ jquery mobile history on data-ajax=false


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -