visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.68k stars 688 forks source link

Add ignoreClassName option #361

Closed akiroom closed 6 years ago

akiroom commented 8 years ago

Allow to skip click event partially.

page.start({ignoreClassName: 'skip-page'});
<!-- fire click event -->
<a href="./example" class="foo">foo</a>

<!-- fire no event-->
<a href="./example" class="foo skip-page">foo</a>
coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 89.362% when pulling 53655a2347ec56e14c0b9b7490bf6f2538fe0a7b on akiroom:master into 53748767130f0c356743d5802223b956e39e61e0 on visionmedia:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 89.362% when pulling 7982b996da1b57360800f4867ca3200b4ceb0098 on akiroom:master into 53748767130f0c356743d5802223b956e39e61e0 on visionmedia:master.

matthewp commented 6 years ago

Thanks for the PR but I don't think I want to accept this. You should already be able to handle this yourself by setting up an event listener and calling stopPropagation().