Skip to content

Commit

Permalink
#47 Fixed reference to jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
PixelsCommander committed Apr 14, 2015
1 parent f86d929 commit fa4597f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 45 deletions.
34 changes: 18 additions & 16 deletions dist/htmlgl.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions dist/htmlgl.min.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions page/js/htmlgl.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions src/gl-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@
}

//Wrap to jQuery plugin
if (w.$ !== undefined) {
$[HTMLGL.JQ_PLUGIN_NAME] = {};
$[HTMLGL.JQ_PLUGIN_NAME].elements = [];
if (w.jQuery !== undefined) {
jQuery[HTMLGL.JQ_PLUGIN_NAME] = {};
jQuery[HTMLGL.JQ_PLUGIN_NAME].elements = [];

$.fn[HTMLGL.JQ_PLUGIN_NAME] = function () {
jQuery.fn[HTMLGL.JQ_PLUGIN_NAME] = function () {
return this.each(function () {
if (!$.data(this, 'plugin_' + HTMLGL.JQ_PLUGIN_NAME)) {
if (!jQuery.data(this, 'plugin_' + HTMLGL.JQ_PLUGIN_NAME)) {
var propellerObj = HTMLGL.GLElement.createFromNode(this);
$.data(this, 'plugin_' + HTMLGL.JQ_PLUGIN_NAME, propellerObj);
$[HTMLGL.JQ_PLUGIN_NAME].elements.push(propellerObj);
jQuery.data(this, 'plugin_' + HTMLGL.JQ_PLUGIN_NAME, propellerObj);
jQuery[HTMLGL.JQ_PLUGIN_NAME].elements.push(propellerObj);
}
});
};
Expand Down

0 comments on commit fa4597f

Please sign in to comment.