onComplete: function(){
$("body").css({'overflow-y':'hidden'});
},
onClosed: function(){
$("body").css({'overflow-y':'visible'});
}
$("#fancy_vhod").fancybox({
'width' : 500,
'height' : 550,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe',
onComplete: function(){
$("body").css({'overflow-y':'hidden'});
},
onClosed: function(){
$("body").css({'overflow-y':'visible'});
}
});
<div class="form-group">
@Html.LabelFor(model => model.DateEnd, "Дата закінчення поїздки", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<div class="input-group" id="datetimepicker1">
@Html.EditorFor(model => model.DateEnd, new { htmlAttributes = new { @class = "form-control" } })
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
@Html.ValidationMessageFor(model => model.DateEnd, "", new { @class = "text-danger" })
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker1').datetimepicker();
});
</script>
.modal-open{overflow:hidden}
$('body').addClass('modal-open');
- добавляет$('body').removeClass('modal-open');
- удаляет$("#fancy_registr, #fancy_zabili, #fancy_vhod, #fancy_send_email, #fancy_zhaloba, #fancy_map, #fancy_mess, #fancy_vip1, #fancy_vip2, #fancy_vip3").live('click', function(){
$(".fl_hidden").hide();
$('body').addClass('modal-open');
$("#fancybox-close").live('click', function(){
$(".fl_hidden").show();
$('body').removeClass('modal-open');
});
$("#fancybox-overlay").live('click', function(){
$(".fl_hidden").show();
$('body').removeClass('modal-open');
});
});
var options = $('#regionsList option');
var array_option_v2 = new Array();
jQuery.each(options, function(index, value) {
var el = {label:jQuery(value).text(),value:jQuery(value).val()}
array_option_v2.push(el);
})
$("#input-region-name").autocomplete({
source: array_option_v2 ,
minLength: 2,
select: function(event, el)
{
console.log(el.label);
console.log(el.value);
}
});