2

Say I've got three select boxes all of which are set up to $.bbq.pushState onChange. If the selects also have interdependencies (e.g. selecting a different model changes what colors are available) changing one select can result in window.hashchange firing multiple times: once from the initial change, and again for each of the dependent selects' change handlers.

If the hashchange handler is expensive (or not idempotent) this can be a problem. What's the best way to prevent this from happening?

James Allardice
  • 164,175
  • 21
  • 332
  • 312
sprugman
  • 19,351
  • 35
  • 110
  • 163

0 Answers0