jQuery BBQ, How to detect a repeat click, which doesn't trigger a hashchange
I'm using the jQuery plugin hashchange: http://benalman.com/projects/jquery-hashchange-plugin/
$(function(){
$(window).hashchange( function(){
// location.hash
})
$(window).hashchange(); // Trigger the event (useful on page load).
});
This works great the problem is if you click on a link more than once:
<a href="#/p/31"&开发者_开发知识库gt;im a link</a>
the hashchange doesn't refire which I want so that when the user clicks on a link more than once I can refresh the data. Is that possible?
Any ideas on how I can detect a repeat click?
Thanks
Check the hash before you apply it, and/or use a flag.
精彩评论