This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 9th, 2013  |  syntax: None  |  size: 0.47 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <ul class="static">
  2.     <li class="static"><a class="static menu-item" href="/SitePages"> </a></li>
  3.     <li>other anchor tags</li>
  4.     <li></li>
  5.  </ul>
  6.        
  7. $('a[href="/SitePages"]').bind('click', function(){
  8.     $(this).closest('li').css({
  9.         backgroundColor: "#000"
  10.     });
  11. });
  12.        
  13. $('a[href="/SitePages"]').click(function(){this.parent.css("background-color", "blue")});
  14.        
  15. $('a[href="/SitePages"]').click(function(){this.closest('li').css("background-color", "blue")});
clone this paste RAW Paste Data