Start a function delayed after in "ready(function.."
hello,
I successfully made a slideout menu. working fine if somebody clicks on the menubutton.
- $(document).ready(function () {
- $('#displaymenu').click(function () {
- $('#showmenu').toggle('slow');
- });
- });
but now I want it to slide out automatically after 30 seconds IF the menubutton wasn't pressed before.
I want to show that there is a menu for people who don't know where to click. This menu should then automatically close after 5 seconds. But I don't really know which function could to this?
I don't wanna just delay the sliding menu. It should be depending on if the menu wasn't used before.
Is this realizable?
- $(document).ready(function () {
- $('#displaymenu').click(function () {
- $('#showmenu').toggle('slow');
- });
- $('#showmenu').delay(30000).fadeToggle();
- $('#showmenu').delay(35000).fadeToggle();
- });
doesn't work. This actually blocks the menu for 30 seconds :/
Thank you in advance