Skip to content

Instantly share code, notes, and snippets.

@koentjuh1
koentjuh1 / smooth-scrolling-top-top.js
Last active August 3, 2016 17:15
Smooth scrolling
$('.back-to-top').on('click', function (e) {
e.preventDefault();
$('html,body').animate({
scrollTop: 0
}, 700);
});
<html lang="nl-NL" id="top">
<div class="back-to-top">
<a href="#top" class="btn-top"><i class="fa fa-angle-up"></i></a>
</div>
</html>
@koentjuh1
koentjuh1 / Tutorials.txt
Last active August 8, 2016 12:19
Tutorials
HTML5 Semantic:
Download extention google chrome: HTML5 outliner
Tutorial:
https://webdesign.tutsplus.com/courses/semantic-html-how-to-structure-web-pages?ec_promo=learning_roundup
-------------------------------------------------------------------------------------------------------------
Solid HTML form structure:
Tutorial:
https://webdesign.tutsplus.com/courses/solid-html-form-structure
@koentjuh1
koentjuh1 / item list line.js
Created August 30, 2016 09:15
product list line
$(".item-list .item").each( function (index) {
index += 1;
// als er 4 items zijn voeg html toe.
if(index % 4 === 0) {
$(this).after('<div class="col-xs-12 line line-3"></div>');
}
// als er 3 items zijn voeg html toe.
if(index % 3 === 0) {
@koentjuh1
koentjuh1 / Random addClass acitve.html
Created August 30, 2016 09:31
Random addClass acitve
<div class="carousel-inner" role="listbox">
<div class="item" style="background-image: url(&quot;images/slider1.jpg&quot;);">
</div>
<div class="item" style="background-image: url(&quot;images/slider2.jpg&quot;);">
</div>
<div class="item" style="background-image: url(&quot;images/slider3.jpg&quot;);">
</div>
</div>
@koentjuh1
koentjuh1 / Add class to parent.html
Created August 30, 2016 10:09
Add class to parent and remove when clicked outside the element
<div class="click-box">
<div class="btn btn-default">click me</div>
<div class="click-content">
click content
</div>
</div>
@koentjuh1
koentjuh1 / Scroll to div.html
Created August 30, 2016 10:59
Scroll to div
/* Scroll button: */
<div class="arrow-icon scroll" data-rel="#arrow-scroll-to">
</div>
/* Scroll to: */
<div id="arrow-scroll-to">
</div>
@koentjuh1
koentjuh1 / Read more.html
Last active August 30, 2016 11:02
Read more jquery
$('article').readmore({
speed: 300,
collapsedHeight: 100,
lessLink: '<a href="#">Lees minder</a>',
moreLink: '<a href="#">Lees meer</a>'
});
@koentjuh1
koentjuh1 / owl-carousel 2.0 custom navigation.html
Last active August 30, 2016 11:06
owl-carousel 2.0 custom navigation
@koentjuh1
koentjuh1 / Get height of div with jquery.js
Created August 30, 2016 11:09
Get height of div with jquery
$(document ).ready(function() {
var result = $(".row-about-us .left").height();
$(".row-about-us .right").css("height", result);
});