2

I go over some code and I saw the following code

  var failedExtPlugins = PluginR.$getFailPlug();

It seems that this time the $ is not refer to jquery object (yes I know that when you use Jquery you start with $) I guess,so what does it mean? it look like regular method...but way the use $

Adarsh M Pallickal
  • 813
  • 3
  • 16
  • 37
SagitB
  • 23
  • 6
  • This might answer your question: http://stackoverflow.com/questions/6209462/when-why-to-prefix-variables-with-when-using-jquery – sriniprash Dec 26 '14 at 07:46
  • @sriniprash- I know that you can define varibale but I dont think that this is the case... – SagitB Dec 26 '14 at 07:50
  • In JS the `$` is an ordinary character in variable names, just like the `_`. Anyone can use it for any purpose. It has no exclusive connection to jQuery. – Tomalak Dec 26 '14 at 09:25

2 Answers2

0

It looks just like a part of a name. I like to use $ in a name of jQuery objects I have. Maybe author has some thoughts about that.

Bandydan
  • 623
  • 1
  • 8
  • 24
0

Its a jQuery wrapped object. $ObjectName reflects that its holding a reference of jQuery wrapped object of particular dom object. For Example:

var $obj = $("#SomeId");
Sumeet
  • 27
  • 1
  • 5