jquery – What does dollar mean?

Question:

Hello. Can't figure out what this jQuery entry means:

var $tab_title_input = $( "#tab_title"),

As far as I know, the dollar sign usually stands for some kind of function (or the word jQuery ). What did the developers want to say? The example is taken from the jQuery website.

Answer:

  • The dollar sign is the allowed character for an identifier in the Javascript language.
  • jQuery uses the $ sign as an alias (abbreviation) for the jQuery identifier.

That is, in this particular case

  • $tab_title_input is just a name including a dollar sign,
  • $( "#tab_title") – jQuery function call.
Scroll to Top
AllEscort