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

  • SEARCH
  • Home
  • 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 4084498
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:26:52+00:00 2026-05-20T18:26:52+00:00

personally I prefer the first syntax jQuery() is it safe respect to the common

  • 0

personally I prefer the first syntax

jQuery()

is it safe respect to the common used:

$(document).ready()

For the other selector i will anyway use $('#id'). i am just asking for the first .ready

  • 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-20T18:26:53+00:00Added an answer on May 20, 2026 at 6:26 pm

    The two names $ and jQuery are synonyms. jQuery is the more explicit; $ may be overridden if you use another framework.

    If you pass a function as the first argument to your call to the jQuery function (or, obviously, to $), it is executed exactly as if it were a call to jQuery(document).ready. So yes, it is exactly the same.

    Indeed, all these are functionally equivalent (provided you don’t have anything else mucking around with $):

    $(document).ready(function() {});
    jQuery(document).ready(function() {});
    $(function() {});
    jQuery(function() {});
    

    It is entirely a matter of circumstance and style as to which you use.

    My personal preference is to use the explicit $(document).ready call (#1): it is obvious that this is code that will be run when the DOM is ready. The major advantage of your preference (#4) is that it clearly denotes that the code is jQuery, which may be useful for someone reading your code in future.

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

Sidebar

Related Questions

Where do you personally prefer to put html tag handlers with JQuery-powered Html page
leisure/curiosity question as implied in the title. I personally prefer the new operators as
First, a confession. In about 10 years of professional development, I've never used a
I've used Tiles and Sitemesh for a number of years and while I personally
I am evaluating Windows Azure and Google App Engine. Personally I prefer Windows Azure
Personally I really prefer Unit Testing and write them for good coverage. (let's say
Personally, if I look at the git or the linux repo with gitk, I
I personally know limited PHP, however I have a script provided by another, that
require('fortunes') fortune('106') Personally I have never regretted trying not to underestimate my own future
I am personally a SVN lover, but am starting to fall prey to the

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.