Is it possible to call jQuery’s $(document).ready function from within another Javascript function? I have a button, which when clicked should call the jQuery DOM ready function. Is this possible?
Is it possible to call jQuery’s $(document).ready function from within another Javascript function? I
Share
If you are calling it from another javascript function, drop the
$(document).readypartor if you want to call a function only when the document is ready, put the function call inside
$(document).readyBut you are not taking advantage of jquery’s full functionality here. If you want to associate an onclick event with an element, you can do it like so:
In the js file: