javascript - Catching in page links with jQuery -
Hello, I want to turn on a function when the user clicks on the page link, for example abc.com/hello. Html # variable1 I want #Virible1 to capture and execute the function.
If you want to get the string after the hash:
$ ("A [href * = '#']"). Click (function () {var hash = this.href.replace (/.*#(.*)$/, '$ 1'); // return something incorrect}};
Comments
Post a Comment