How can I extract (with jQuery) the numbers from this a href Tags?
<a href="#slide1"></a>
<a href="#slide2"></a>
<a href="#slide3"></a>
Thanks a lot for help.
How can I extract (with jQuery) the numbers from this a href Tags?
<a href="#slide1"></a>
<a href="#slide2"></a>
<a href="#slide3"></a>
Thanks a lot for help.
Something like this should work:
$('a').each(function() {
alert($(this).prop('href').replace(/[^\d]+/, ''));
});
$('a').each(function(){
alert($(this).prop("href").replace("#slide",""));
});