Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3721606
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:36:52+00:00 2026-05-19T05:36:52+00:00

Example: $(document).click(function() { blah }); // and $(‘html’).click(function() { blah });

  • 0

Example:

$(document).click(function() { blah });   
// and
$('html').click(function() { blah });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T05:36:53+00:00Added an answer on May 19, 2026 at 5:36 am

    I’ll answer the question in several parts.

    In JavaScript (not just jQuery, but all JavaScript) the document keyword is a handle on the object that contains the HTMLDocument. You might use this handle in the following scenarios…

    // Get the current web address
    alert(document.location.href);
    

    When you pass the document to jQuery, it parses the document into a jQuery object.

    When you pass the “html” selector to jQuery, it uses this string to find any elements in the document object model that match the selector (in all cases, there will be one html element).

    In reality, you won’t notice a difference in behaviour between these:

    $(document).click(function() { alert('blah'); });   
    $('html').click(function() { alert('blah'); });
    $('body').click(function() { alert('blah'); });
    

    But the technical difference is that document is an object and ‘html’ is a string that is used to search for an element. Both the object and any matching elements are converted into jQuery objects.

    As they all add a click event handler to the “visible” part of the page, which is the only part of the page a user can realistically click on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working with a latex document with eps images as in the example below... \documentclass[11pt]{paper}
I want to add items in a LaTeX-document. Say for example, that I want
Does anyone know of papers/books/etc. that document patterns for databases? For example, one common
For example in C# or in JavaScript documents. If not, is there point in
Example: You have a shortcut s to SomeProgram in the current directory. In cmd.exe
Example I have Person , SpecialPerson , and User . Person and SpecialPerson are
Example: select ename from emp where hiredate = todate('01/05/81','dd/mm/yy') and select ename from emp
example: a_list = [1, 2, 3] a_list.len() # doesn't work len(a_list) # works Python
example: I want to see if array[5] holds a value or is empty.
Example C API signature: void Func(unsigned char* bytes); In C, when I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.