Trigger a Function on PageLoad

364 Views Asked by At

I've a code that works for slide a hidden div with clicking another div

<script> 
$(document).ready(function(){
  $("#flip").click(function(){
    $("#panel").slideDown("slow");
  });
});
</script>

But I want to remove "flip" div. I don't want to click for sliding. Sı I tried:

$(document).ready(function(){
    $("#panel").slideDown("slow");
});

but didn't work. Any suggestions?

1

There are 1 best solutions below

1
On BEST ANSWER

Try on page load

$(window).load(function(){
    $("#panel").slideDown("slow");
});

Visit: http://justprogrammer.com/