$("#myform").validate({
invalidHandler: function(event, validator) {
// 'this' refers to the form
var errors = validator.numberOfInvalids();
if (errors) {
var message = errors == 1
? 'You missed 1 field. It has been highlighted'
: 'You missed ' + errors + ' fields. They have been highlighted';
$("div.error span").html(message);
$("div.error").show();
} else {
$("div.error").hide();
}
}
});
slide: function( event, ui ) {
$( "НУЖНЫЙ БЛОК" ).val( "$" + ui.value );
}
$( ".selector" ).on( "slide", function( event, ui ) {} );
grep "$(date -d "-2day" +"%b %d")\|$(date -d "-1day" +"%b %d")\|$(date -d +"%b %d")" $ipfw/ipfw.log >> $ipfw/reject_log_2d
$(window).scroll(function() {
var the_top = $(document).scrollTop();
if (the_top > $('.container-fluid.header-top').height()) {
$('.header-down').addClass('navbar-fixed-top');
$('header').css({'margin-top':parseInt($('.header-down').height())+20+'px'});
}
else {
$('.header-down').removeClass('navbar-fixed-top');
$('header').css({'margin-top':0});
}
})
setInterval(function(){
$.ajax({
url: '../core/remote_ip.txt',
success: function(data) {
if(data != $("#txtIP").val())
{
var colors = ['#ff0000', '#00ff00', '#0000ff'];
var random_color = colors[Math.floor(Math.random() * colors.length)];
$('#txtIP').css('color', random_color);
$("#txtIP").val(data);
}
}
});
}, 1000);