<div class="item" onclick="location.href='a1.html'"></div>
<div class="item" onclick="location.href='a2.html'"></div>
<div class="item" onclick="location.href='a3.html'"></div>
<div class="item" onclick="location.href='a4.html'"></div>
<div class="item" onclick="location.href='a5.html'"></div>
$('.item').each(function() {
$(this)[0].replace('div', 'a')
})
Is it possible to change all the div
tag to a
tag? I have tried the code above but not work, any ideas?
Thanks