Run given code only for other paths


/ Published in: JavaScript
Save to your folder(s)

Executes code only for locations other than specified.


Copy this code and paste it in your HTML
  1. if (!window.location.pathname.match(/^\/path/)) {
  2. // code
  3. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.