$(document).mouseup(function (e){
var div = $('.js-search__form');
if (!div.is(e.target)
&& div.has(e.target).length === 0) {
$('.search-field').val('');
$('.search-btn').removeClass('is-change');
$('.js-ui-select').removeClass('is-show');
setTimeout(function(){
$('.js-search__form').addClass('search__form_hide');
},100);
}
});
setTimeout(function(){
$('.js-search__form').addClass('search__form_hide');
},100);
var div = $('.js-search__lable');
.menu {
witdh: 616px;
margin: 0 auto;
}
(function(){
// if firefox 3.5+, hide content till load (or 3 seconds) to prevent FOUT
var d = document, e = d.documentElement, s = d.createElement('style');
if (e.style.MozTransform === ''){ // gecko 1.9.1 inference
s.textContent = 'body{visibility:hidden}';
var r = document.getElementsByTagName('script')[0];
r.parentNode.insertBefore(s, r);
function f(){ s.parentNode && s.parentNode.removeChild(s); }
addEventListener('load',f,false);
setTimeout(f,3000);
}
})();
// a nice improvement to this script is to only hide the elements using webfonts
// with visibility:hidden instead of the entire <body>
// that's up to you to select them in that textContent line, though
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("video").on("mouseover" , function(){
this.play();
$( this ).css( "background-color", "black" );
});
$("video").on("mouseleave", function(){
this.pause();
})
})
</script>
<video width=320 src="http://www.mokselle.ru/video/video-bg.mp4">
</video>