Hi I need a drop down banner ads on a project I am working on. it’s like a toggle effect but with the choice to close it or automatically closes after sometime and pushes it down.
it would be similar to http://www.dynamicdrive.com/dynamicindex17/dddropdownpanel.htm but by default should visible just don’t know how to put the time duration to close it. By any chance can someone show me how to add it to the javascript
something like
$(function(){
$("#banner").slideDown(function() {
setTimeout(function() {
$("#banner").slideUp();
}, 30000);
});
});
The javascript Im using is
<script type="text/javascript">
$(document).ready(function () {
$('#toggle-view li').click(function () {
var text = $(this).children('p');
if (text.is(':hidden')) {
text.slideDown('200');
$(this).children('span').html('-');
} else {
text.slideUp('200');
$(this).children('span').html('+');
}
});
});
Your current code works fine
fiddle: http://jsfiddle.net/maniator/BgVtY/