10 examples of 'disable dropdown jquery' in JavaScript

Every line of 'disable dropdown jquery' 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
67function toggle_dropdown(){
68 $('.btn-group.open').removeClass('open');
69}
151function dropDownMenu (trigger_id) {
152
153 // console.log('Trigger ID: ' + trigger_id);
154
155 // get Menu-Item position X/Y
156 var menuItemH = $(trigger_id).height();
157 // console.log(menuItemH);
158 var menuPos = $('#'+trigger_id).offset();
159 // console.log(menuPos);
160
161 var menuPosY = parseInt(menuPos.top) + 25;
162 var menuPosX = parseInt(menuPos.left) - 10; // dropdown content has 10px margin.
163
164 var dropDownMenuID = $("#"+trigger_id).next('ul').attr('id');
165
166 if (!dropDownMenuID) {
167 dropDownMenuID = trigger_id + '-content';
168 $("#"+trigger_id).next('ul').attr('id', dropDownMenuID);
169 }
170
171 $("#"+dropDownMenuID).insertAfter('#footer');
172 $("#"+dropDownMenuID).css({
173 top: menuPosY,
174 left: menuPosX
175 }).slideDown('fast');
176
177 return true;
178}
76function closeDropdown () {
77 Dropdown.componentInstance.hide()
78}
8function dropdown(){
9 document.getElementById("zoteroDropdown").classList.toggle("hide");
10};
76function closeDropdownFn() {
77 jqLite.removeClass(menuEl, openClass);
78
79 // remove event handlers
80 jqLite.off(doc, 'click', closeDropdownFn);
81 jqLite.off(doc, 'keydown', handleKeyDownFn);
82}
54enable() {
55 this.field.enable();
56}
81function closeDropdownFn() {
82 jqLite.removeClass(menuEl, openClass);
83
84 // remove event handlers
85 jqLite.off(doc, 'click', closeDropdownFn);
86}
26closeDropDown() {
27 this.item.find(".dropdown-content").removeClass('show');
28 $(window).off('click', this.dropWatch);
29}
274_hide($elem, idx) {
275 var $toClose;
276 if ($elem && $elem.length) {
277 $toClose = $elem;
278 } else if (idx !== undefined) {
279 $toClose = this.$tabs.not(function(i, el) {
280 return i === idx;
281 });
282 }
283 else {
284 $toClose = this.$element;
285 }
286 var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0;
287
288 if (somethingToClose) {
289 $toClose.find('li.is-active').add($toClose).attr({
290 'aria-expanded': false,
291 'data-is-click': false
292 }).removeClass('is-active');
293
294 $toClose.find('ul.js-dropdown-active').attr({
295 'aria-hidden': true
296 }).removeClass('js-dropdown-active');
297
298 if (this.changed || $toClose.find('opens-inner').length) {
299 var oldClass = this.options.alignment === 'left' ? 'right' : 'left';
300 $toClose.find('li.is-dropdown-submenu-parent').add($toClose)
301 .removeClass(`opens-inner opens-${this.options.alignment}`)
302 .addClass(`opens-${oldClass}`);
303 this.changed = false;
304 }
305 /**
306 * Fires when the open menus are closed.
307 * @event DropdownMenu#hide
308 */
309 this.$element.trigger('hide.zf.dropdownmenu', [$toClose]);
310 }
311}
510function clearDropdown(el) {
511 for (let i = el.options.length - 1; i >= 0; i--) {
512 el.options.remove(i);
513 }
514}

Related snippets