This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getScrollTop(){ | |
if(typeof pageYOffset!= 'undefined'){ | |
//most browsers except IE before #9 | |
return pageYOffset; | |
} | |
else{ | |
var B= document.body; //IE 'quirks' | |
var D= document.documentElement; //IE with doctype | |
D= (D.clientHeight)? D: B; | |
return D.scrollTop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).click( function (event) { | |
if ($(event.target).closest(".page-navigation").length | |
|| $(event.target).closest(".nav-switcher").length) return; | |
// What to do on click | |
event.stopPropagation(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isRussian(input) { | |
var value = input.value; | |
var rep = /[\x00-\x7F]/; | |
if (rep.test(value)) { | |
value = value.split(rep).join(""); | |
input.value = value; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add minimal value for date input | |
var date = new Date(); | |
var currentYear = date.getFullYear(); | |
var currentMonth = ('0' + (date.getMonth() + 1).toString()).slice(-2); | |
var currentDay = ('0' + (date.getDate()).toString()).slice(-2); | |
var minDate = currentYear-75 + "-" + currentMonth + "-" + currentDay; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('hidden.bs.modal', function (event) { | |
if ($('.modal:visible').length) { | |
$('body').addClass('modal-open'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("div").click(function() { | |
var bg = $(this).css('background-image'); | |
bg = bg.replace('url(','').replace(')','').replace(/\"/gi, ""); | |
alert(bg); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var rename = require("gulp-rename"); | |
gulp.task('compressjs', function () { | |
gulp.src('js/*.js') | |
.pipe(uglify()) | |
.pipe(rename({ suffix: '.min' })) | |
.pipe(gulp.dest('dist')) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var rename = require("gulp-rename"); | |
var uglifycss = require('gulp-uglifycss'); | |
var sass = require('gulp-sass'); | |
gulp.task('default', function (){ | |
gulp.watch('js/*.js', ['compressjs']); | |
gulp.watch('css/*.css', ['compresscss']); |
OlderNewer