$ sign in Jquery

In jQuery, the $ sign it's just an alias to jQuery(), then an alias to a function.

This page reports:

Basic syntax is: $(selector).action()
    A dollar sign to define jQuery
    A (selector) to "query (or find)" HTML elements
    A jQuery action() to be performed on the element(s)

The $ is just a function. It is actually an alias for the function called jQuery, so your code can be written like this with the exact same results:
    jQuery('#Text').click(function () {
      jQuery('#Text').css('color', 'red');

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>