How to use 'jquery operator' in JavaScript

Every line of 'jquery operator' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
596PushMenu._jQueryInterface = function _jQueryInterface(operation) {
597 return this.each(function () {
598 var data = $(this).data(DATA_KEY);
599
600 var _options = $.extend({}, Default, $(this).data());
601
602 if (!data) {
603 data = new PushMenu(this, _options);
604 $(this).data(DATA_KEY, data);
605 }
606
607 if (operation === 'toggle') {
608 data[operation]();
609 }
610 });
611};
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

91value: function _jQueryInterface(operation) {
92 return this.each(function () {
93 var data = $(this).data(DATA_KEY);
94
95 if (!data) {
96 data = new PushMenu(this);
97 $(this).data(DATA_KEY, data);
98 }
99
100 if (operation) {
101 data[operation]();
102 }
103 });
104}

Related snippets