This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/assets/javascripts/orbit-bar-search.js

43 lines
1.0 KiB
JavaScript

$(document).ready(function(){
$('.search').tooltip({
placement: "bottom"
});
});
$(document).on('mouseenter', '.orbit-bar-search', function (){
$(this).parents('.search').stop().animate({
'width':'265px',
},200);
$('.navbar-search').stop().animate({
'left':'4px',
'opacity':'1'
},500);
$(this).parents('.search').css({
'background-color': 'rgba(0, 0, 0, 0.5)',
});
$(this).parents('.search').addClass('visible');
});
$(document).on('mouseleave', '.search.visible', function (){
$(this).stop().animate({
'width':'28px',
},500);
$('.navbar-search').stop().animate({
'left':'30px',
'opacity':'0',
},200);
$(this).css({
'background-color': 'transparent',
});
$(this).removeClass('visible');
});
$(document).on("mouseenter",".orbit-bar-language, .language-menu",function(){
$(this).parents('.language').addClass("open")
})
$(document).on("mouseleave",".orbit-bar-language, .language-menu",function(){
$(this).parents('.language').removeClass("open")
})