mourningdove/htdocs/js/nav-jquery.js
2026-05-24 01:03:05 +00:00

35 lines
844 B
JavaScript

/*
js/nav-jquery.js
Tropospherical and Gradation Horizontal Navigation JavaScript
Authors:
Mark Smith <mark@dreamwidth.org>
Copyright (c) 2009 by Dreamwidth Studios, LLC.
This program is free software; you may redistribute it and/or modify it under
the same terms as Perl itself. For a copy of the license, please reference
'perldoc perlartistic' or 'perldoc perlgpl'.
*/
jQuery( function($) {
// used below
var hideNavs = function() {
$( '.topnav' ).removeClass( 'hover' );
$( '.subnav' ).removeClass( 'hover' );
};
// add event listeners to the top nav items
$( '.topnav' )
.mouseover( function() {
hideNavs();
$( this ).addClass( 'hover' );
} )
.mouseout( function() {
hideNavs();
} );
} );