What is jQuery.getScript() in jQuery?

What is jQuery.getScript() in jQuery?

Comments

  • The getScript() method is used to get and execute a JavaScript using an AJAX HTTP GET request.

    Syntax
    $(selector).getScript(url,success(response,status))

    Parameter                                                 Description
    url                                                              Required. Specifies the url to send the request to
    success(response,status)                         Optional. Specifies the function to run if the request succeeds
                                                                      Additional parameters:
                                                                      response - contains the result data from the request
                                                                      status - contains the status of the request
Sign In or Register to comment.