{"id":484,"date":"2023-08-25T17:22:42","date_gmt":"2023-08-25T17:22:42","guid":{"rendered":"\/\/api.jquery.com\/?p=484"},"modified":"2024-04-20T18:07:24","modified_gmt":"2024-04-20T18:07:24","slug":"load-shorthand","status":"publish","type":"post","link":"https:\/\/api.jquery.com\/load-shorthand\/","title":{"rendered":".load()"},"content":{"rendered":"<article id=\"load1\" class=\"entry method\"><h2 class=\"section-title\">\n<span class=\"name\">.load( handler )<\/span><span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a><\/span><span class=\"version-details\">version deprecated: <a href=\"\/category\/version\/1.8\/\">1.8<\/a>, removed: <a href=\"\/category\/version\/3.0\/\">3.0<\/a><\/span>\n<\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong>Bind an event handler to the \"load\" event, or trigger that event on an element.<\/p>\n<ul class=\"signatures\">\n<li class=\"signature\">\n<h4 class=\"name\">\n<span class=\"version-details\">version added: <a href=\"\/category\/version\/1.0\/\">1.0<\/a><\/span><a id=\"load-handler\" href=\"#load-handler\"><span class=\"icon-link\"><\/span>.load( handler )<\/a>\n<\/h4>\n<ul><li id=\"load-handler-handler\">\n<div><strong>handler<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>( <a href=\"http:\/\/api.jquery.com\/Types\/#Event\">Event<\/a> eventObject )<\/div>\n<div>A function to execute each time the event is triggered.<\/div>\n<\/li><\/ul>\n<\/li>\n<li class=\"signature\">\n<h4 class=\"name\">\n<span class=\"version-details\">version added: <a href=\"\/category\/version\/1.4.3\/\">1.4.3<\/a><\/span><a id=\"load-eventData-handler\" href=\"#load-eventData-handler\"><span class=\"icon-link\"><\/span>.load(  [eventData ], handler )<\/a>\n<\/h4>\n<ul>\n<li id=\"load-eventData-handler-eventData\">\n<div><strong>eventData<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Anything\">Anything<\/a>\n<\/div>\n<div>An object containing data that will be passed to the event handler.<\/div>\n<\/li>\n<li id=\"load-eventData-handler-handler\">\n<div><strong>handler<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>( <a href=\"http:\/\/api.jquery.com\/Types\/#Event\">Event<\/a> eventObject )<\/div>\n<div>A function to execute each time the event is triggered.<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li class=\"signature\">\n<h4 class=\"name\">\n<span class=\"version-details\">version added: <a href=\"\/category\/version\/1.0\/\">1.0<\/a><\/span><a id=\"load\" href=\"#load\"><span class=\"icon-link\"><\/span>.load()<\/a>\n<\/h4>\n<ul><li><div class=\"null-signature\">This signature does not accept any arguments.<\/div><\/li><\/ul>\n<\/li>\n<\/ul>\n<div class=\"longdesc\" id=\"entry-longdesc\">\n    <div class=\"warning\">\n      <p>This API has been removed in jQuery 3.0.<\/p>\n      <p>Instead of <code>.load( handler )<\/code> or <code>.load( eventData, handler )<\/code>, use <a href=\"\/load-event\/#on1\"><code>.on( \"load\", handler )<\/code><\/a> or <a href=\"\/load-event\/#on1\"><code>.on( \"load\", eventData, handler )<\/code><\/a>, respectively.<\/p>\n      <p>Instead of <code>.load()<\/code>, use <a href=\"\/load-event\/#trigger2\"><code>.trigger( \"load\" )<\/code><\/a>.<\/p>\n    <\/div>\n    <div class=\"warning\">\n      <p>The Ajax module also has a method named <code><a href=\"\/load\/\">.load()<\/a><\/code>. Which one is fired depends on the set of arguments passed.<\/p>\n    <\/div>\n  <\/div>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Bind an event handler to the &#8220;load&#8221; event, or trigger that event on an element.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,33,61,78,91],"tags":[],"class_list":["post-484","post","type-post","status-publish","format-standard","hentry","category-deprecated-18","category-document-loading","category-removed","category-78","category-91"],"_links":{"self":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/comments?post=484"}],"version-history":[{"count":2,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/484\/revisions"}],"predecessor-version":[{"id":942,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/484\/revisions\/942"}],"wp:attachment":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/media?parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/categories?post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/tags?post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}