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.
Comments
Post a Comment