hanigamal / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

hard-coded '$' call #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using Rails 1.3.5 and Ruby 1.8.7 with jRails and Prototype, change the 
jQuery variable from the default '$'. The in_place_editor_field tag will fail 
on save.

What is the expected output? What do you see instead?
The save fails with the error "$(document).keyup" is not defined". This is 
because the '$' is assigned to Prototype

What version of the product are you using? On what operating system?
jQuery 1.3.2

Please provide any additional information below.
The '$' variable is hardcoded in some place into the file, which breaks 
deployments of jQuery where '$' is assigned to something else or not assigned. 
"jQuery" should be used for consistency.

Original issue reported on code.google.com by mattmos...@gmail.com on 1 Sep 2010 at 5:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have a legacy system that uses prototype but we are phasing it out in favor 
of jQuery.  I have jQuery mapped like so: 

jQuery.noConflict();

I naively did a replace-all $ -> jQuery but that failed.  I am using jQuery 
1.4.3

Original comment by purpze...@gmail.com on 19 Oct 2010 at 9:56

GoogleCodeExporter commented 9 years ago
This is strange - the code should be guarded against this by the closure around 
it with

(function($) {....})(jQuery)

which is the recommended way to write plugins.

Can you elaborate more on what error you where seing? This would only not work 
if you mapped jQuery to something else than jQuery - which you didn't do?

Original comment by mhaec...@gmail.com on 27 Jan 2011 at 8:46