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

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -