google-code-export / openid-realselector

Automatically exported from code.google.com/p/openid-realselector
1 stars 1 forks source link

Plugin is not sanitized to reference jQuery properly #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Link to Prototype
2. Include the javascript call: jQuery.noConflict();
3. Try to link the plugin

What is the expected output? What do you see instead?

* Expected is for the plugin to function properly.

* Actual is the error message: "$ is not a function"

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

* v. 1 on Ubuntu 8.04.2 (hardy)

Please provide any additional information below.

* The solution is to wrap the plugin code with the following (note that I
changed the first line of the plugin):

(function($) {
  $.fn.openid = function(opt) {

...

  };
})(jQuery);

---------------------------------------------

I'm attaching the updated js file.

Original issue reported on code.google.com by safety...@gmail.com on 3 Mar 2009 at 8:07

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in #6. I'll not commit all your changes, just the one that solve this 
issue.
(BTW please the next time just put the patch against svn head and not the whole 
file).
Thank you!

Original comment by Refl...@gmail.com on 6 Mar 2009 at 2:11

GoogleCodeExporter commented 9 years ago

Original comment by Refl...@gmail.com on 6 Mar 2009 at 2:12