I'm using $(this).attr("href"); to select the href attribute value of the clicked element, but I need to select only the part after the last '=' symbol.
Example:
href="index.php?con=123&id=123&sel=heyhey"
I only need the last part of the href that is 'heyhey'
How can I select this??
Without regex -
var parts = $(this).attr('href').split('=');
var part = parts[parts.length - 1];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With