Skip to content

Instantly share code, notes, and snippets.

@feNyaHub
feNyaHub / fixed-header-when-scroll
Created February 8, 2019 14:25
Fixed sticky header when scrolling
$(window).scroll(function(){
if ($(window).scrollTop() >= 300) {
$('nav').addClass('fixed-header');
}
else {
$('nav').removeClass('fixed-header');
}
});
@feNyaHub
feNyaHub / nth-child-loop.sass
Created February 8, 2019 14:13 — forked from agragregra/nth-child-loop.sass
Sass nth-child background-color loop
$colors: $red, $blue, $accent
@for $i from 1 through length($colors)
.carousel-services .owl-item:nth-child(#{length($colors)}n+#{$i})
background-color: nth($colors, $i)
@feNyaHub
feNyaHub / window-resize-end.js
Created February 8, 2019 14:13 — forked from agragregra/window-resize-end.js
Window resize-end function
//Resize Window
function onResize() {
};
var doit;
doit = setTimeout(onResize, 400);
window.onresize = function() {
clearTimeout(doit);
doit = setTimeout(onResize, 400);
};
@feNyaHub
feNyaHub / more thumbs js
Created November 26, 2018 19:03
More Owl Carousel Thumbs
var recom = $('.recomm-slides');
recom.owlCarousel({
});
// Listen to owl events:
recom.on('changed.owl.carousel', function (event) {
var indexRecom = event.item.index;
$('.recomm-problems li').removeClass('active');
$('.recomm-problems li').eq(indexRecom).addClass('active');
@feNyaHub
feNyaHub / thumbs js
Last active November 26, 2018 19:01
Owl Carousel Thumbs
var RevThumbsSlider = $('.reviews-slider-thumbs');
RevThumbsSlider.owlCarousel({
});
$('.reviews-slider-thumbs .owl-item').on('click',function(){
var indexThumb = $(this).index();
RevMainSlider.trigger('to.owl.carousel', [ indexThumb, 300, true ]);
});
HTML:
<form>
<div class="success"><span>Спасибо за заявку!</span></div>
<!-- Hidden Required Fields -->
<input type="hidden" name="project_name" value="Site Name">
<input type="hidden" name="admin_email" value="admin@mail.com">
<input type="hidden" name="form_subject" value="Form Subject">
<!-- END Hidden Required Fields -->
@feNyaHub
feNyaHub / index.html
Created February 22, 2018 18:34 — forked from chengcyber/index.html
infinite background animation loop
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Animation</title>
<style>
body {
margin: 0px;
background: #000;
}
@feNyaHub
feNyaHub / scroll-top-mnu
Last active November 21, 2018 11:59
jQuery Scroll Top Menu
$(".top-navbar a[href*=\\#]").click(function(){
var ths = $(this);
$("html, body").stop().animate({
scrollTop: $(ths.attr("href")).offset().top + 30
}, 1000);
});
@feNyaHub
feNyaHub / document-scroll-bottom
Created April 28, 2017 11:01
jQuery Scroll Bottom
$("a[href='#bottom']").click(function() {
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
return false;
});
@feNyaHub
feNyaHub / migx-sample.js
Created April 5, 2017 20:13 — forked from agragregra/migx-sample.js
MIGX Sample
Tabs:
[
{"caption":"Tab Title", "fields": [
{"field":"title","caption":"Name"},
{"field":"description","caption":"Description","inputTVtype":"textarea"},
{"field":"imageTV","caption":"Photo","inputTV":"imageTV"}
]}
]
Table: