how to change the height of a div on mouseover with jquery

I am trying to increase the height of a div when hovering over links with jquery. the height of the div should stay the same when transitioning between these links and should have a delay when first hovering over a link. I also need the height increase to transit/animate from 0px tall to 400px tall. this is the code that I am currently using, but it doesn't work??

 $(document).on("mouseenter", ".navDropLink", function() {
     console.log("MOUSEENTER");
     tab_id = $(this).attr('data-tab');
     tab_id_this = $(this).attr('id');
     setTimeoutConst = setTimeout(function(){
               $("#"+tab_id).animateAuto("height", 1000); 
      }, delay);
});
$(document).on("mouseleave", ".navDropLink", function() {
    clearTimeout(setTimeoutConst );
});

Answers


var delay=500, setTimeoutConst;
                    var tab_id, tab_id_this;

                    $(document).on("mouseenter", "#articlesLink", function() {
                         console.log("MOUSEENTER");
                         tab_id = $(this).attr('data-tab');
                         tab_id_this = $(this).attr('id');
                         setTimeoutConst = setTimeout(function(){
                                   $('#navFullDropdown').stop().animate({'height': '400px'}, 500);
                          }, delay);
                    });
                    $(document).on("mouseleave", "#articlesLink", function() {
                    $('#navFullDropdown').stop().animate({'height': '0px'}, 500);
                        clearTimeout(setTimeoutConst );
                    });

Need Your Help

Soap vs Rest over Android

android rest soap

I am creating an app in android. It will be calling a webservice to fetch some confidential info. I need to verify that the user is authenticated to access the info and the service shouldn't be cal...

Save uri to sharedPreferences and play with mediaplayer

android sharedpreferences uri android-mediaplayer

This is the code I use to save the string representation of the Uri to the SharedPreferences: