on page load click on body code example Example: trigger a click on page load jquery $("document").ready(function() { $("button").trigger('click'); });