What is supposed to happen if I run jQuery’s load() function by supplying a page fragment that does not exist? Does it simply load the whole page, or does it load an empty page?
$("#a").load("http://www.example.com #non-existing-id");
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.
From http://api.jquery.com/load/ (at section Loading Page Fragments)
Since the element does not exist, nothing gets loaded within
#a. However, please note that the whole page is still fetched from server.