Friday, July 6, 2012

jquery hashchange event not working

every browser is not supporting the hashchange event.
to be able to manage the issue, add the benalman plugin the your project.

http://benalman.com/projects/jquery-hashchange-plugin/


$(function(){

  // Bind the event.
  $(window).hashchange( function(){
    // Alerts every time the hash changes!
    alert( location.hash );
  })

  // Trigger the event (useful on page load).
  $(window).hashchange();

})

No comments:

Post a Comment