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 9131829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:12:29+00:00 2026-06-17T08:12:29+00:00

The $ dollar sign in front of (this) serves to select the current element.

  • 0

The $ dollar sign in front of (this) serves to select the current element. I’m a little confused about the $ in front of option and thisSelect. Do they have a special meaning?

var $options = $(this).children('option');
var $thisSelect = $(this);

Thanks for helping

  • 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-06-17T08:12:30+00:00Added an answer on June 17, 2026 at 8:12 am

    As everyone said, its just a convention.
    I use the $ sign in front of a variable to identify that this variable holds an object.

    var thisIsANumber = 1024; // No $.. Its a normal variable
    var $divElement = $('div#idOfDiv'); // Yes! Its a jQuery Object
    var $this = $(this); // Commonly used to reduce the work javascript has to do!
    
    //Now I can use something like this.. (Notice how easy it is to read!)
    $divElement.slideUp();
    
    // Or a more `real world` example!
    $('#element').click(function(){
        // Hold $(this) inside a variable
        // So we don't have to traverse the dom unnecessarily
        var $this = $(this); // Save it (its a object.. so prepend a `$` )
        $this.hide(); // Use it again
        $this.fadeIn(); // and again
    //  ^ Has a dollar sign, because it is a jQuery Object.
    });
    

    You will see loads of plugins use this convention (well.. at least the well written ones).
    By storing the object inside a variable, Javascript doesn’t have to crawl through your code each time to get the element. Instead, we already have the element (inside the variable), so we use that to reference it.

    If you use $(this) more then once inside the same callback function, you should store it inside a variable.. (var $this = $(this);). Otherwise, every time you use it, javascript will have to get the element from your source code each time (which can massively decrease performance! (especially for people browsing on a slow/old computer!).

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

Sidebar

Related Questions

I have both books by T.Parr about ANTLR and I see dollar sign all
What does the dollar sign mean in PHP? I have this code: <?php class
I have a balance string which contain a dollar sign in front of it.
Im tring to add a dollar sign to this print statement in front of
I'm a bit confused regarding the dollar sign in jQuery, and was hoping someone
I have tables in Mysql 5 db with names prefixed with a dollar sign
in my app,in a EditText i have to set dollar sign permanently , always
This question is regarding dollar signs $ $ in Windows PowerShell ISE. I have
If I have a variable containing an unescaped dollar sign, is there any way
Java allows identifier to start with or contain $ (dollar sign). e.g int a$b;

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.