Oh, it occurred to me you might have wanted to find this for a link on the page instead of the current url in the browser.
If that's the case, you would do something like this: var b = $('a').attr("href").split("#")[1];
Oh, it occurred to me you might have wanted to find this for a link on the page instead of the current url in the browser.
If that's the case, you would do something like this: var b = $('a').attr("href").split("#")[1];