Toggle the dropdown visibility

@method toggle
@param {object} [e]
777780
function (e) {
    var self = this;
    if (self.isOpen !== true) {
      self.open(e);
    }
    else {
      self.close(e);
    }
  }
692796
function() {
          module.debug('Toggling pop-up');
          if( module.is.hidden() ) {
            module.hideAll();
            module.show();
          }
          else {
            module.hide();
          }
        }
281784
function (t, e) {
            var cmenu = this, x = e.pageX, y = e.pageY;

            if (cmenu._div)
                cmenu._div.css('height', 'auto').css('overflow-y', 'auto');

            cmenu.target = t; // Preserve the object that triggered this context menu so menu item click methods can see it
            cmenu._showEvent = e; // Preserve the event that triggered this context menu so menu item click methods can see it
            if (cmenu.beforeShow() !== false) {
                // If the menu content is a function, call it to populate the menu each time it is displayed
                if (cmenu.menuFunction) {
                    if (cmenu.menu) {
                        $(cmenu.menu).remove();
                    }
                    cmenu.menu = cmenu.createMenu(cmenu.menuFunction(cmenu, t), cmenu);
                    cmenu.menu.css({display: 'none'});
                    $(cmenu.appendTo).append(cmenu.menu);
                }
                var $c = cmenu.menu;
                x += cmenu.offsetX;
                y += cmenu.offsetY;
                var pos = cmenu.getPosition(x, y, cmenu, e); // Extracted to method for extensibility
                cmenu.showShadow(pos.x, pos.y, e);
                // Resize the iframe if needed
                if (cmenu.useIframe) {
                    $c.find('iframe').css({
                        width: $c.width() + cmenu.shadowOffsetX + cmenu.shadowWidthAdjust,
                        height: $c.height() + cmenu.shadowOffsetY + cmenu.shadowHeightAdjust
                    });
                }
                if (cmenu.dropDown) {
                    $c.css('visibility', 'hidden').show();

                    var bodySize = {x: $(window).width(), y: $(window).height()};

                    if ($(t).offset().top + $(t).outerHeight() + $c.height() > bodySize.y) {
                        if ($(t).offset().left + $(t).outerWidth() + $c.width() > bodySize.x)
                            $c.css({
                                top: ($(t).offset().top - $c.outerHeight()) + "px",
                                left: ($(t).offset().left - $c.outerWidth()) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));
                        else
                            $c.css({
                                top: ($(t).offset().top - $c.outerHeight()) + "px",
                                left: ($(t).offset().left) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));
                    }
                    else {

                        if ($(t).offset().left + $(t).outerWidth() + $c.width() > bodySize.x)
                            $c.css({
                                top: ($(t).offset().top + $(t).outerHeight()) + "px",
                                left: ($(t).offset().left - $c.outerWidth()) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));
                        else
                            $c.css({
                                top: ($(t).offset().top + $(t).outerHeight()) + "px",
                                left: ($(t).offset().left) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));

                    }
                    $c.css('visibility', 'visible');
                }
                else
                    $c.css({
                        top: pos.y + "px",
                        left: pos.x + "px",
                        position: "absolute",
                        zIndex: 9999
                    })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                        cmenu.showCallback.call(cmenu);
                    } : null));
                cmenu.shown = true;
                $(document).one('click', null, function () {
                    cmenu.hide();
                }); // Handle a single click to the document to hide the menu
            }
        }
575285
function(elem) {

            var self = this,
                currentDataSelectedText,
                currentDataText,
                currentText,
                defaultText = self.options["defaultText"] || self.selectBox.attr("data-text"),
                currentElem = self.listItems.eq(self.currentFocus);

            if (elem.attr("data-disabled") === "false") {

                currentDataSelectedText = self.listItems.eq(self.currentFocus).attr("data-selectedtext");

                currentDataText = currentElem.attr("data-text");

                currentText = currentDataText ? currentDataText: currentElem.text();

                // If the default text option is set and the current drop down option is not disabled
                if ((defaultText && self.options["html"] ? self.dropdownText.html() === defaultText: self.dropdownText.text() === defaultText) && self.selectBox.val() === elem.attr("data-val")) {

                    self.triggerEvent("change");

                }

                else {

                    // Sets the original dropdown list value and triggers the `change` event on the original select box
                    self.selectBox.val(elem.attr("data-val"));

                    // Sets `currentFocus` to the currently focused dropdown list option.
                    // The unary `+` operator casts the string to a number
                    // [James Padolsey Blog Post](http://james.padolsey.com/javascript/terse-javascript-101-part-2/)
                    self.currentFocus = +elem.attr("data-id");

                    // Triggers the dropdown list `change` event if a value change occurs
                    if (self.originalElem.value !== self.dropdownText.attr("data-val")) {

                        self.triggerEvent("change");

                    }

                }

            }

        }
936982
function (e) {
        var p       = this.paginator,
            sel     = this.select,
            options = p.get('rowsPerPageOptions'),
            opt,cfg,val,i,len;

        this.all = null;

        for (i = 0, len = options.length; i < len; ++i) {
            cfg = options[i];
            opt = sel.options[i] ||
                  sel.appendChild(document.createElement('option'));
            val = l.isValue(cfg.value) ? cfg.value : cfg;
            opt.innerHTML = l.isValue(cfg.text) ? cfg.text : cfg;

            if (l.isString(val) && val.toLowerCase() === 'all') {
                this.all  = opt;
                opt.value = p.get('totalRecords');
            } else{
                opt.value = val;
            }

        }

        while (sel.options.length > options.length) {
            sel.removeChild(sel.firstChild);
        }

        this.update();
    }
619153
function onBackdropClick(e) {
          e.preventDefault();
          e.stopPropagation();
          opts.restoreFocus = false;
          $mdUtil.nextTick($mdSelect.hide, true);
        }
34014
function toggleVisibility(dom, show) {
  dom.style.display = show ? '' : 'none';
  dom['hidden'] = show ? false : true;
}
644920
function hideHandler( e )  {
				var inContainer = moduleFilter.contains( e.target );

				if ( e.keyCode === 27 || !inContainer ) {
					if ( e.keyCode === 27 && inContainer ) {
						moduleSearch.focus();
					}
					dropDown.style.display = "none";
					removeEvent( document, "click", hideHandler );
					removeEvent( document, "keydown", hideHandler );
					moduleSearch.value = "";
					searchInput();
				}
			}
516930
function(e) {
        Dom.setStyle(this.id, "visibility", "");
        
        // Fire the reordered event if position in list has changed
        var clickEl = this.getEl();
        var newIndex = inputEx.indexOf(clickEl ,clickEl.parentNode.childNodes);
        if(this._originalIndex != newIndex) {
           this._list.onReordered(this._originalIndex, newIndex);
        }
    }
893716
function _toggleBoundaryToggle () {
        var somethingEntered = false;

        $('input[type="number"]').each(function () {
            if (parseInt(this.value, 10) !== 0) {
                somethingEntered = true;
            }
        });

        if (somethingEntered) {
            $showBoundsCheck.parent().slideDown();
        }
        else {
            $showBoundsCheck.parent().slideUp();
        }
    }
705867
function onCardHeaderClick(e) {
  if (/** @type {!Element} */(e.target).nodeName == 'A') {
    return;
  }

  /** @type {?Node} */
  const node = /** @type {!Element} */(e.currentTarget).parentNode;
  if (node && node.nodeType === NodeType.ELEMENT) {
    const card = /** @type {!Element} */(node);
    if (card.classList && card.classList.contains('property')) {
      card.classList.toggle('open');
    }
  }
}
185408
function ( e ) {

        e.preventDefault();

        this.s[4].borderColor = this.colors.select;
        this.s[4].color = this.colors.select;

    }
144859
function onTriggerClick(e, noFocus) {
    toggleSubmenu(elements.trigger, (_, done) => {
      Classlist(elements.trigger).toggle(ACTIVE_CLASS);
      const wasActive = Classlist(elements.menu).contains(ACTIVE_CLASS);
      const first = wasActive ? ACTIVE_CLASS : 'dqpl-show';
      const second = first === ACTIVE_CLASS ? 'dqpl-show' : ACTIVE_CLASS;

      Classlist(elements.menu).toggle(first);

      if (elements.scrim) {
        Classlist(elements.scrim).toggle('dqpl-scrim-show');
      }

      setTimeout(() => {
        Classlist(elements.menu).toggle(second);
        if (elements.scrim) { Classlist(elements.scrim).toggle('dqpl-scrim-fade-in'); }
        setTimeout(() => done(noFocus));
      }, 100);
    });
  }
710738
function toggleTargetState( element ) {
  if ( element.classList.contains( this.classes.targetExpanded ) ) {
    this.ui.target.classList.add( this.classes.targetCollapsed );
    this.ui.target.classList.remove( this.classes.targetExpanded );
  } else {
    this.ui.target.classList.add( this.classes.targetExpanded );
    this.ui.target.classList.remove( this.classes.targetCollapsed );
  }
}
1009316
function (e) {
            if (e && e.preventDefault) e.preventDefault();
            var $el = $(e.target);
            var cid = $el.attr('todo-cid');
            if (cid) {
                this.options.toggleItem(cid);
            }
            return false;
        }
910398
function(e) {
        e.preventDefault();

        var element = this.element;

        // If the showcase is loading (AJAX) or is not shown, exit early
        // This stops cases where the blackout can be clicked early
        if (!element.is(':shown') || element.hasClass('is-loading')) {
            return;
        }

        this.hide();
    }
263152
function() {
			var self = this;
	
			if (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;
			self.focus();
			self.isOpen = true;
			self.refreshState();
			self.$dropdown.css({visibility: 'hidden', display: 'block'});
			self.positionDropdown();
			self.$dropdown.css({visibility: 'visible'});
			self.trigger('dropdown_open', self.$dropdown);
		}