slideDown div after the DOM is ready.(jquery)
Question
basically I am looking for a way to slideDown a div in jquery after the page has loaded. I've found few ways how to do it with a click button like this but less luck in finding a solution to load it without a button. I've tried to work with this previous topic but no luck.
Solution
$(document).ready(function() {
$('#div').slideDown();
}
OTHER TIPS
this solution http://jsfiddle.net/XqqtN/ is doing it on load
for your code you will need to wrap it in
$(function(){
... code ...
});
One thing you can do is to trigger the click event in the JS, so that the div slide down works on document ready, without the user having to press the buttton. code here: http://jsfiddle.net/7VpPu/
You can set the button element opacity to 0, so that it remains invisible to user
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow