I would like this script to automatically run after 5 seconds. Just getting into jquery and did not know how to do this... Thanks!
$(document).ready(function(e) {
$('#dropdown').on('click',function(){
$('.dropdownwrap').slideToggle();
});
});
As i understand your question, you want to trigger click() event after 5 seconds, you could use following code:
$(document).ready(function (e) {
$('#dropdown').on('click', function () {
$('.dropdownwrap').slideToggle();
}).delay(5000).queue(function () {
this.click();
});
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments