I have the following function which is activated on click:
$('.results .view-rooms').click(function(){ }
Is there anyway I can trigger this function on document load?
Yes.
$(document).ready(function(){ // on document ready
$(".results .view-rooms").click(); // click the element
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With