-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScript1.js
More file actions
15 lines (14 loc) · 719 Bytes
/
Script1.js
File metadata and controls
15 lines (14 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$(document).ready(function() {
$('.sub').hide(); // hide sub-navigation on pageload
$dir1 = "/home/"; // set main home directory
$myCurrentDir = getCurDirr(); // set the current user directory
$userVar = $get_username(); // current user's username
/** check for a click event on an anchor inside .itm div
prevent the default link action so the page doesn't change on click
access the parent element of .itm followed by the next .sub list to toggle open/close
**/
$('.itm a').live('click', function(e){
e.preventDefault();
$(this).parent().next('.sub').slideToggle('fast');
});
});