javascript - how to get href value in <a> tag using jQuery -
inside html
source code, there's <a>
tag href
attribute, want whatever has after second slash after individuals
in case 22284494
. exact tag is:
<a href="/individuals/22284494" class="i-photo">
how do using jquery?
something target anchor, attribute, split on /
, last part
var numb = $('a.i-photo').attr('href').split('/').pop();
Comments
Post a Comment