Reputation: 17
i have an wordpress site and it have menus over there. what i want is this that when some body hover the SITE logo then it's showing the drop down menus.... what i am trying to do is be always open not only when im clicking. it have to load when page get refreshed,
can any body tell that how to do that?
Upvotes: 0
Views: 1727
Reputation: 10634
Documentation - http://api.jquery.com/ready/
Documentation: http://api.jquery.com/css/
//only execute when the document returns ready
//this can be trivial if your putting the code at the footer
//you may wish to use a self invoking function in that case
$(document).ready(function(){
setTimeout(function(){
//do something
$('#somethingcool').css('background-color', 'red');
//3 seconds = 3000ms
}, 3000);
});
Upvotes: 0
Reputation: 15330
Use $(document).ready(function() {}
to run code after the page loads. You can then use the JQuery delay() function to wait for 3 seconds before calling slideDown on your menu object. Something like this would work:
$(document).ready(function() {
$('#yourMenuID').delay(3000).slideDown(300);
}
Upvotes: 2