Is there a way to use jquery without using the $ - accessor?

Posted by ManBugra on Stack Overflow See other posts from Stack Overflow or by ManBugra
Published on 2010-04-15T13:07:58Z Indexed on 2010/04/15 13:13 UTC
Read the original article Hit count: 151

Filed under:
|

I'am dealing here with a web application that defines somewhere in a java script file:

$ = function() { return document.getElementById(arguments[0]); }

Every other script, jsp page and dynamic content loaded from db depends on the semantic of the $ - sign working as 'document.getElementById'. Now i would like to start using jqery. So i think i have 2 options:

  • refactor the existing application (all script files, jsp's, dynamic content etc.)
  • somehow introduct jquery as something differnt than '$'
  • (not really an option) don't start using jquery

Are there any other solutions? What would you do?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about refactoring