So I have a function or two that I want to run after my page has been loaded for 10 seconds. Here is the code right now:
jQuery(document).ready(function() {
jQuery(".expand-cnt-link").click(function() {
jQuery(this).toggleClass("ecf_closed").parent(".exp-col-content-holder").find(".hidden-content").first().stop().slideToggle("slow").css("display","inline-block");
return false;
});
jQuery(".expand-cnt-link").toggleClass("ecf_closed").parent(".exp-col-content-holder").find(".hidden-content").css("display","none");
Specifically I'm looking for the code that currently is triggered by a click to element ".expand-cnt-link" to be triggered instead by the page having been loaded for 10 seconds.
I've checked out this article: JQuery wait x seconds after document ready
Which seems to suggest that the correct code would be:
jQuery(document).ready(function() {
setTimeout(function() {
jQuery(this).toggleClass("ecf_closed").parent(".exp-col-content-holder").find(".hidden-content").first().stop().slideToggle("slow").css("display","inline-block");
return false;
}, 2000);
jQuery(".expand-cnt-link").toggleClass("ecf_closed").parent(".exp-col-content-holder").find(".hidden-content").css("display","none");
However that has given me no luck...any suggestions?