Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <li><a href="#">Current Period</a>
- <ul>
- <li><a href="#">2012</a>
- <li> a href="#">2011</a> //...you get the point
- <li><a href="#" class="noclick">Current Period</a> ....
- $("#nav a").click(function(e){
- if ($(e.target).hasClass("noclick"))
- return false;
- // your other code here
- });
- $("#nav a").not(".noclick").click(function() { ...
- $('.noclick').unbind('click');
- $('.noclick').click(function(e){e.preventDefault();});
- <a href="javascript:void(0);">Text</a>
- ('.noclick').on('click' , function(e) {
- e.preventDefault();
- });
- <li><a href="#" class="noclick">Current Period</a> ....
- <li><a href="#" class="noclick" onclick="return false;">Current Period</a> ....
- .noclick { pointer-events: none; cursor: default; }
- .noclick { cursor: default; }
- .noclick { cursor: default; }
- $('.noclick').each(function() {
- var $this = $(this);
- $this.hover(function() {
- // do something...
- });
- $this.click(function() {
- return false;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement