Is there any way to take only part of string in jquery? -
I have some anchor links that start with ID In my jquery code, I only want to take the But Use Apart from this, your HTML is not well prepared .. "menu -" .
& lt; A href = "" id = "menu-alphabet" & gt; & Lt; A href = "" id = "menu-city" & gt; & Lt; A href = "" id = "menu-country" & gt;
menu after anchor link id -
For example: $ ("A [id = = menu -]"). Click (function () {e.preventDefault (); $ (this) .tab ('show');});
menu - .
click (function () {e.preventDefault (); $ ( '#' +) This.id.split ('-') [1]) tab ('show');});
Comments
Post a Comment