I have a situation where I need to perform several actions on a page to initialize it. I donโt have a code yet, because, to be honest, Iโm having trouble finding a place to start.
Here is what I want to do:
jQuery(document).ready(function($) { $('#element-one').trigger('click'); // wait for the first trigger event to complete (it loads ajax content into a div tag) // then move on to this one... $('#element-two').trigger('click'); // then move on to this one... $('#element-three').trigger('click'); // then move on to this one... $('#element-four').trigger('click'); // then finally move on to the last one $('#element-five').trigger('click'); });
How is this achieved?
source share