orbit-basic/app/assets/javascripts/orbit-bar-search.js

20 lines
541 B
JavaScript
Raw Normal View History

2012-04-06 10:06:57 +00:00
$(document).on('click', '.orbit-bar-search', function (){
if ($(this).parents('.search').hasClass('visible')){
$(this).parents('.search').stop().animate({
'width':'28px',
});
$(this).parents('.search').css({
'background-color': 'transparent',
});
$(this).parents('.search').removeClass('visible');
}
else{
$(this).parents('.search').stop().animate({
'width':'265px',
});
$(this).parents('.search').css({
'background-color': 'rgba(0, 0, 0, 0.5)',
});
$(this).parents('.search').addClass('visible');
}
});