Content-Type: "text/css"
document.onclick=function(){
document.getElementById('box').style.display='none';
}
//Если все же надо давать возможность кликать по самому элементу, то так:
document.onclick=function(e){
if(e.target!=document.getElementById('box'))
document.getElementById('box').style.display='none';
}
$(document).on("change", '.multiple input[value=""]', function(){
var i = 0;
var n = $('.file').length;
var items = n + 1;
$(this).attr("id",'contact_attachment' + items)
$('.multiple').prepend('<input class="btn-review file full " type="file" multiple name="contact_attachment1" id="contact_attachment " value=""/>');
});
<meta name="viewport" content="width=ТУТ ШИРИНА МАКЕТА">
window.onresize
$('.grid').masonry({
resize: false
});
jQuery(document).on("click",".linkclass",function(e){
e.preventDefault();
$('body').scrollTo(jQuery(e.currentTarget).attr("href"));
return false;
});
$.fn.scrollTo = function( target, options, callback ){
if(typeof options == 'function' && arguments.length == 2){ callback = options; options = target; }
var settings = $.extend({
scrollTarget : target,
offsetTop : 50,
duration : 500,
easing : 'swing'
}, options);
return this.each(function(){
var scrollPane = $(this);
var scrollTarget = (typeof settings.scrollTarget == "number") ? settings.scrollTarget : $(settings.scrollTarget);
var scrollY = (typeof scrollTarget == "number") ? scrollTarget : scrollTarget.offset().top + scrollPane.scrollTop() - parseInt(settings.offsetTop);
scrollPane.animate({scrollTop : scrollY }, parseInt(settings.duration), settings.easing, function(){
if (typeof callback == 'function') { callback.call(this); }
});
});