aboutsummaryrefslogtreecommitdiff
path: root/assets/js/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/script.js')
-rw-r--r--assets/js/script.js28
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