This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
/* tired of scrolling? try this... */ | |
var lazyScroll = setInterval(function() { | |
window.scrollTo(0, window.pageYOffset+1); | |
}, 0); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage smoothScrollTo.call([NodeElement]) | |
function smoothScrollTo(completeCallback) { | |
// center element on screen | |
var posY = window.pageYOffset - (window.innerHeight / 2) + this.getBoundingClientRect().top + (this.offsetHeight / 2); | |
scrollAnimator = TweenLite.to(window, 1, { | |
scrollTo: { | |
y: posY | |
}, | |
onComplete: function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This styles are the minimal essential properties | |
* to get chosen working without extra styling | |
* that you are going to override later | |
*/ | |
.chosen-container { | |
position: relative; | |
display: -moz-inline-stack; | |
display: inline-block; | |
*vertical-align: auto; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Extends Webflow Slider with public methods to swich between slides | |
* | |
* Paste this code on the Custom Code panel to get started: | |
* | |
* var slider = new W_SLIDER_CONTROLLER( '#element_id' ); | |
* slider.setup('drag_disabled') // removes the drag-and-slide interaction | |
* slider.goto( 2 ); // jumps to the second slide | |
*/ | |
var W_SLIDER_CONTROLLER = function( el ){ |