Skip to content

Instantly share code, notes, and snippets.

@koentjuh1
koentjuh1 / jQuery-viewport-checker add class on scroll.js
Created May 6, 2017 17:59
jQuery-viewport-checker add class on scroll
jQuery(document).ready(function() {
jQuery('.post').addClass("hidden").viewportChecker({
classToAdd: 'visible animated fadeIn',
offset: 100
});
});
@koentjuh1
koentjuh1 / Disable scroll mobile.php
Created May 5, 2017 09:39
Disable scroll mobile
<?php
$mobile_detect = new Mobile_Detect();
?>
<?php
if($mobile_detect->isMobile() || $mobile_detect->isTablet())
{
} else {
?>
<div class="disable-scroll">
@koentjuh1
koentjuh1 / Mobile detect DOIT.php
Created April 28, 2017 09:18
Mobile detect DOIT.php
<?php $mobile_detect = new Mobile_Detect(); ?>
<?php if($mobile_detect->isMobile() && $mobile_detect->isTablet()) { ?>
<li><a href="tel:0488451524">0488 45 15 24</a></li>
<?php } else { ?>
<li>0488 45 15 24</li>
<?php } ?>
@koentjuh1
koentjuh1 / DOIT foundation height equalizer fix safari browser (zie 50plusbeurs).js
Created March 31, 2017 07:09
DOIT foundation height equalizer fix safari browser (zie 50plusbeurs)
Foundation.reInit('equalizer');
@koentjuh1
koentjuh1 / fancybox open div iframe,html
Created February 21, 2017 10:53
fancybox open div iframe
<div class="blok-kalender">
<div id="item" class="standaard-button btn-reserveren fancybox-ajax"><img src="images/calendar.png" alt="">Beschikbaarheid</div>
<div style="display:none">
<div id="data">
<?php CMSFrontend::renderModule('pagina', array('type' => 'Tekstblok', 'code' => 'kalender_overzicht')); ?>
<iframe src="http://www.mijnbeschikbaarheid.nl/kalender/brt-682" style="min-width:650px;" width="100%" height="300"></iframe>
<ul>
<li><span class="groen"></span> Beschikbaar</li>
<li><span class="rood"></span> Niet beschikbaar</li>
</ul>
@koentjuh1
koentjuh1 / Refresh reaload on certain point.js
Created February 21, 2017 09:18
Refresh reaload on certain point
var width = $(window).width();
$(window).resize(function() {
if (width > 1100 && $(window).width() < 1100) {
location.reload();
}
else if (width < 1100 && $(window).width() > 1100) {
location.reload();
}
});
@koentjuh1
koentjuh1 / onepage scroll smooth with offset.js
Created February 20, 2017 13:10
onepage scroll smooth with offset
$('a[href*="#"]:not([href="#"])').on('click',function(e) {
e.preventDefault();
var offset = 94;
var target = this.hash;
if ($(this).data('offset') != undefined) offset = $(this).data('offset');
$('html, body').stop().animate({
'scrollTop': $(target).offset().top - offset
}, 800, 'swing', function() {
// window.location.hash = target;
});
Zo check je ie9 en lager
<!--[if lte IE 9]>
<![endif]-->