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>');
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).
In the browser developer tools console - at least in Firefox, IE11, (can't test lesser IE's), Edge and Chrome - $ and $$ do have particular functions (if the page hasn't defined those vars) - see MDN Documentation for Helper Command in the Web Developer Tools Console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With