Guest User

Untitled

a guest
Jul 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // $(fn) shorthand for $(document).ready(fn)
  2. $(function() {
  3. // Hover is a handy $ function that takes two functions, the first for when the mouse goes in and the other for when it goes out
  4. $('.navcontainer li').hover(function() {
  5. // this in a $ event handler will refer to the element raising the event
  6. $('.' + this.id).addClass('thecolor');
  7. }, function() {
  8. $('.' + this.id).removeClass('thecolor');
  9. });
  10. });
Add Comment
Please, Sign In to add comment