Need to call a filter function on some options based on a radio selected (Link here), How can I call this after the page is loaded? the radio is set from a DB call and I would like to filter the options
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Or
Or the shorter but less readable variant:
All of these will cause my_function to be called after the DOM loads.
See the ready event documentation for more details.
Edit:
To simulate a click, use the click() method without arguments:
From the docs:
To put it all together, the following code simulates a click when the document finishes loading: