I have:
<span id="test"><a href="google.com/">link1</a></span>
<br />
<br />
<span class="click" id=1>click one</span> <br />
<span class="click" id=2>click two</span> <br />
<span class="click" id=3>click three</span> <br />
$(".click").live('click', function() {
$("a").attr('href',$("a").attr('href')+$(this).attr('id'));
});
LIVE: http://jsfiddle.net/wtAbp/10/
if i click one i have:
google.com/1
this is ok, but if i again click, for example click two i have:
google.com/12
instead of:
google.com/2
how can i fix it?