diff --git a/js/dropdown-widget.js b/js/dropdown-widget.js index 8eb113f..2c8fc60 100644 --- a/js/dropdown-widget.js +++ b/js/dropdown-widget.js @@ -5,46 +5,45 @@ (function ($) { - "use strict"; - - var $dropdown = '"; - - $('.js-facets-dropdown-links .item-list').html($dropdown); - - // Go to the selected option when it's clicked. - $('.facets-dropdown').on('change', function() { - window.location.href = this.value; - }); - }; - - /** - * Create an option for the dropdown list and append it to it. - */ - Drupal.facets.makeOption = function () { - var $link = $(this)[0]; - var href = $($link.innerHTML)[0].href; - var text = $link.innerText.replace('(-) ',''); - var option = ''; - - $dropdown += option; - }; + 'use strict'; + + var $dropdown = ''; + + $('.js-facets-dropdown-links .item-list').html($dropdown); + + // Go to the selected option when it's clicked. + $('.facets-dropdown').on('change', function () { + window.location.href = this.value; + }); + }; + + /** + * Create an option for the dropdown list and append it to it. + */ + Drupal.facets.makeOption = function () { + var $link = $(this)[0]; + var href = $($link.innerHTML)[0].href; + var text = $link.innerText.replace('(-) ', ''); + + $dropdown += ''; + }; })(jQuery);