Please explain the meaning of the $ and $$
This is sample code use $ and $$: https://github.com/cytoscape/cytoscape.js-qtip/blob/master/cytoscape-qtip.js
what mean this code use $:
var $qtipContainer = $('<div></div>');
Advertisement
Answer
The whole code is just a function call with two arguments:
;(function( $, $$ ){ 'use strict';
// skipped
})(
typeof jQuery !== 'undefined' ? jQuery : null,
typeof cytoscape !== 'undefined' ? cytoscape : null
);
The first argument is jQuery global variable (or null, if jQuery is undefined), and the second is cytoscape global variable (or null, if is undefined).