Skip to content

Instantly share code, notes, and snippets.

/*MediaAutoheight*/
function MediaAutoheight(){
var minHeight = 0;
var windowWidth = window.innerWidth;
var mediaObject = $(".media-autoheight");
if (windowWidth >= 993){
mediaObject.each(function(){
var height = parseInt($(this).height());
if (height > minHeight){
minHeight = height;
@media (max-width: 992px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
}
.navbar-toggle {
display: block;
}
html
min-height: 100%
position: relative
body
height: 100%
padding-bottom: 142px
footer
width: 100%
position: absolute
bottom: 0
$(".slider-gallery").each(function(){
$(this).slickLightbox();
});
/*placeholder sass*/
input::-webkit-input-placeholder
color: #c0392b
input::-moz-placeholder
color: #c0392b
input:-ms-input-placeholder
color: #c0392b
<script> new WOW().init(); </script>
//js
/*form validate*/
$(function(){
$('.form-feedback').validate({
rules: {
name: {
required: true,
minlength: 2
},
phone: {
//GOOGLE MAPS API
//js
if (document.getElementById('map-canvas')){
var myLatlng = new google.maps.LatLng(49.5282699, 29.9455942);
var mapOptions = {
zoom: 15,
center: myLatlng
}
/*button scroll-to-top*/
var amountScrolled = 200;
$(window).scroll(function() {
if ( $(window).scrollTop() > amountScrolled ) {
$('.to-top').fadeIn('slow');
} else {
$('.to-top').fadeOut('slow');
}
});
/*scroll navigation*/
$('.scroll').on('click', function(e) {
e.preventDefault();
var section = $(this).attr('href').substr($(this).attr('href').indexOf('#'));
var $section = $(section);
$('html, body').animate({
scrollTop: $section.offset().top-90
}, 1000);