javascript - Append string to child link URLs -
what's best way append string end of links in list javascript? from:
<div id="pagination"> <ul> <li><a href="http://site.com/p1/">page 1</a></li> <li><a href="http://site.com/p2/">page 2</a></li> </ul> </div> to
<div id="pagination"> <ul> <li><a href="http://site.com/p1/?some=blah">page 1</a></li> <li><a href="http://site.com/p2/?some=blah">page 2</a></li> </ul> </div> expressionengine gives little control how these pagination links generated.
$('#pagination a').attr('href', function() { return this.href + '?some=blah'; }); look @ working here.
edited per elusive's input in comments.
Comments
Post a Comment