Skip to content

Instantly share code, notes, and snippets.

View birkmarcus's full-sized avatar

Birk Marcus birkmarcus

View GitHub Profile
@birkmarcus
birkmarcus / SwiperStructure.md
Last active September 5, 2023 12:04
Multiple SwiperJS on same site

Div names and structure

| 
|—— div.slider-prev 
|—— div.slider-next 
|—— div.swiper-container 
|   |—— div.swiper-wrapper 
|       |—— div.swiper-slide 
|—— div.swiper-pagination-small 
@birkmarcus
birkmarcus / HorizontalScrollCMSOne.html
Last active August 18, 2023 12:16
Snippits from Katarina-website
<!-- CMS vertical scroll based on width of individual image in gallery, Ends on the last one -->
<style>
.horizontal-trigger {
height: calc(100% - 100vh);
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.8.0/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.8.0/ScrollTrigger.min.js"></script>
<script>
@birkmarcus
birkmarcus / gist:a5c20d0eede7e926ef44
Created September 18, 2014 17:00
Style current Link active
function setSelectedPageNav() {
var pathName = document.location.pathname;
if ($("nav ul li a") != null) {
var currentLink = $("nav ul li a[href='" + pathName + "']");
currentLink.addClass("active");
}
}
setSelectedPageNav();
@birkmarcus
birkmarcus / gist:842453cf97e6d1e5b602
Created September 18, 2014 16:59
Add Clearfix / Class
$(document).ready(function() {
//Build your CSS.
$( '.l-main' ).addClass( 'clearfix' );
});
@birkmarcus
birkmarcus / gist:b50a25156ddfa17eb763
Created September 16, 2014 20:20
views - Cycle - Change background colour on last slide
(function ($) {
$('.view-slider .view-content').cycle({
fx:'scrollLeft'
});
var slideCheck = setInterval(function(){
if($('.view-slider .view-content .views-row-last').is(':visible')) {
$('body').addClass('someclassname');
} else {