Skip to content

Instantly share code, notes, and snippets.

function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect()
$(window).resize(function() {
heightDetect()
});
Tabs:
[
{"caption":"Tab Title", "fields": [
{"field":"title","caption":"Name"},
{"field":"description","caption":"Description","inputTVtype":"textarea"},
{"field":"imageTV","caption":"Photo","inputTV":"imageTV"}
]}
]
Table:
function heightDetect() {
$(".main-head").css("height", $(window).height());
};
heightDetect()
$(window).resize(function() {
heightDetect()
});
$(function() {
$(window).scroll(function() {
if($(this).scrollTop() != 0) {
$('#toTop').fadeIn();
} else {
$('#toTop').fadeOut();
}
});
//css Add class .scroll to links with anchor
//jQuery
// to top right away
if ( window.location.hash ) scroll(0,0);
// void some browsers issue
setTimeout( function() { scroll(0,0); }, 1);
$(function() {
@Romanbecool
Romanbecool / button.sass
Created August 12, 2017 00:28 — forked from agragregra/button.sass
Button Sass Styles (Universal Starter)
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600
$(window).scroll(function() {
if ($(this).scrollTop() > $(this).height()) {
$('.top').addClass('active');
} else {
$('.top').removeClass('active');
}
});
$('.top').click(function() {
$('html, body').stop().animate({scrollTop: 0}, 'slow', 'swing');
});
//put blocks in the section(position: relative)
<div class="triangle triangle-right-light"></div>
<div class="triangle triangle-left-light"></div>
//sass
.triangle
width: 0
height: 0
position: absolute
.mfp-fade.mfp-bg {
opacity: 0;
background: #00;
transition: all .3s;
}
.mfp-fade.mfp-bg.mfp-ready { opacity: .9; }
.mfp-fade.mfp-bg.mfp-removing { opacity: 0; }
.mfp-fade.mfp-wrap .mfp-content {