Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // $(fn) shorthand for $(document).ready(fn)
- $(function() {
- // 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
- $('.navcontainer li').hover(function() {
- // this in a $ event handler will refer to the element raising the event
- $('.' + this.id).addClass('thecolor');
- }, function() {
- $('.' + this.id).removeClass('thecolor');
- });
- });
Add Comment
Please, Sign In to add comment