3

I was searching for the answer ,is it possible to have any other symbol instead of $ and Jquery in jquery program

Naga Bhavani
  • 105
  • 1
  • 3
  • 12
  • possible duplicate of [jQuery Tips and Tricks](http://stackoverflow.com/questions/182630/jquery-tips-and-tricks) look at the answer by Oli: [The noConflict function - Freeing up the $ variable](http://stackoverflow.com/a/182666) – Artjom B. Aug 11 '15 at 15:52

4 Answers4

3

jQuery.noConflict().

In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $. If you need to use another JavaScript library alongside jQuery, return control of $ back to the other library with a call to $.noConflict(). Old references of $ are saved during jQuery initialization; noConflict() simply restores them.

var newJ = jQuery.noConflict()
rrk
  • 15,677
  • 4
  • 29
  • 45
1

Yes you can by Calling noConflict()

w3schools

var jq = $.noConflict();
akash
  • 2,117
  • 4
  • 21
  • 32
0

you can use jQuery.noConflict. Refer Jquery for more details

Sathish
  • 106
  • 8
-2

Modify below in your jquery.js file

$j=$;

to

$abcd=$; // some symbol you want
DongHoon Kim
  • 386
  • 2
  • 14
  • This is not a good idea, It's always better that we use `jQuery.noConflict()` function. – rrk Aug 10 '15 at 12:04