Im new for jQuery, and I'm trying to convert my entire phone class to have a binding with href:
What i have
<div class="phone">111-111-1111</div>
<div class="phone">666-555-4444</div>
What I want
<div class="phone"><a href="tel:111-111-1111">111-111-1111</a></div>
<div class="phone"><a href="tel:666-555-4444">666-555-4444</a></div>
I'm trying to do something like this, but I'm pretty lost:
$('.phone').each(function(){
$(this).wrapInner('<a name="???' + $(this).html() + '" />');
});
source
share