diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-18 10:54:08 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-18 10:54:08 +0000 |
| commit | a35da9f9ccc1124d9b6f4461c7216ffbb0285e2f (patch) | |
| tree | d5b4b8548caae36a20e1258a8341dab4b3d522d2 /assets/js/script.js | |
| parent | 16bbc66ebafc6f1a55e47dbda3f3c0f658fe715c (diff) | |
| parent | c1ce89359a7b54ec97b54ce577e5534c180c5c4b (diff) | |
merged
Diffstat (limited to 'assets/js/script.js')
| -rw-r--r-- | assets/js/script.js | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/assets/js/script.js b/assets/js/script.js index f73d7f0..e752f0c 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -1,6 +1,5 @@ function main(){ - // User-profile dynamic paging var items = [ $("#profile-general"), @@ -30,6 +29,7 @@ function main(){ * from server*/ switch($(this).text()) { case "General": + console.log("clicked general"); $("#profile-general").show(); break; case "Follows": @@ -49,5 +49,31 @@ function main(){ } }); + + + // --- nav scripts --- + $("input").keyup( function(event) { + if(event.keyCode == 13){ + $(".go-button").click(); + } + }); + + $(".dropdown").hover(function(){ + $(".dropdown-toggle", this).trigger("click"); + }); + + $(".dropdown-toggle").click(function() { + $(this).next(".dropdown-menu").fadeToggle(200); + }); + + // For the Second level Dropdown menu, highlight the parent + $( ".dropdown-menu" ) + .mouseenter(function() { + $(this).parent('li').addClass('active'); + }) + .mouseleave(function() { + $(this).parent('li').removeClass('active'); + }); + } $(document).ready(main);
\ No newline at end of file |
