helpcenter/Web/js/core/language-selector.js
alexandervnuchkov 71f171fb08 First commit
2016-08-29 16:51:20 +03:00

30 lines
1.0 KiB
JavaScript

;
var LanguageSelectorManager = new function() {
var init = function() {
$('div.custom-select').hover(function() { $(this).css('background', 'none'); }, function() { $(this).css('background', 'none'); });
};
var openLngSelector = function () {
if (!$('#LanguageSelector').hasClass('open')) {
$('div.custom-select').unbind('mouseenter mouseleave');
$('div.custom-select').css('background', 'none');
$('#LanguageSelector ul.options:first').slideDown(10, function () {
$('#LanguageSelector').addClass('open');
$(document).one('click', function () {
$('div.custom-select').css('background', 'none');
init();
$('#LanguageSelector ul.options:first').hide();
$('#LanguageSelector').removeClass('open');
});
});
}
};
return {
init: init,
openLngSelector: openLngSelector
};
};