I'm pretty much new to the jquery library, so I was experimenting with some jquery functions. This is the code I wrote
<html>
<head>
<title>slide</title>
<style>
.outer {
width: 700px;
height: 1000px;
border: 2px dashed green;
margin: 20px;
}
.box {
widht: 100px;
height: 80px;
border: 2px solid green;
margin: 20px;
}
</style>
</head>
<body>
<input type='button' id='btn' value='click' />
<div class='outer'></div>
<script type='text/javascript' src='jquery.js'></script>
<script>
$('#btn').click(function() {
$('.outer').prepend("<div class='box'></div>");
$('.box').slideDown(3000);
});
</script>
</body>
As you see, if i click the button, a new div prepends to the parent div. However the jquery slideDown function doesn't seem to have any effect but when I used slideUp, it worked as expected. So whenever i click the button the new div is created but no slidedown animation takes place. Am I missing something?