I'm using this script to wrap two divs:
jQuery:
$("#wrapcb").click(function(){
$('#cboxOverlay, #colorbox').wrapAll('<div class="wrapcolorbox">');
});
HTML:
<span><a id="wrapcb" href="http://www.example.com/one">First link</a></span>
<span><a id="wrapcb" href="http://www.example.com/two">Second link</a></span>
<span><a id="wrapcb" href="http://www.example.com/three">Third link</a></span>
The weird thing is that this script only works on the first link and all others are being ignored.
Any ideas what I'm doing wrong?