Click Trigger On Page Load (ul > Li)
I have the following HTML code in my website:
- All
Solution 1:
Solution 2:
If you are perfoming click action on Li tag , then below code will be helpfull.
<div id="gallery"> <ulclass="pictures"><li><ahref="#"data-filter="*"class="active">All</a></li><li><ahref="#"data-filter=".web">Web</a></li><li><ahref="#"data-filter=".design">Design</a></li><li><ahref="#"data-filter=".video">Video</a></li></ul> </div> setTimeout(function () { $('.pictures li:nth-child(1)').trigger("click"); }, 10);
Post a Comment for "Click Trigger On Page Load (ul > Li)"