Skip to content

Instantly share code, notes, and snippets.

@mrkrand
mrkrand / new_gist_file
Created August 7, 2013 10:48
FancyBox jQuery 1.9.0 fix
Patch the fancybox js file to make it work with jQuery v1.9.0 as follow :
Open the jquery.fancybox-1.3.4.js file (full version, not pack version) with a text/html editor.
Find around the line 29 where it says :
isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
and replace it by (EDITED March 19, 2013: more accurate filter):
isIE6 = navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest,
UPDATE (March 19, 2013): Also replace $.browser.msie by navigator.userAgent.match(/msie [6]/i) around line 615 (and/or replace all $.browser.msie instances, if any), thanks joofow ... that's it!
@mixin drop-down($background: #fff, $textColor: #000, $borderColor: #ccc) {
display: inline-block;
border: none;
position: relative;
background-color: $background;
margin-right: 23px;
> span {
color: $textColor;
padding: 12px 42px 12px 15px;
font-size: 16px;
/* Generic dropdown script */
$.fn.edaDropdown = function() {
var dropDowns = this;
dropDowns.each(function( index, element ) {
jQuery(this).find('> span').click(function(e){
e.stopPropagation();
var currentOpen = false;
var a = jQuery(this);
if (a.parent().hasClass('open')) {
currentOpen = true;
@mrkrand
mrkrand / jQuery-notTop-class.js
Created April 5, 2016 15:04
jQuery script thats toggles not-top class to body tag if user scrolls away
function pageNotTop() {
var notTop = false;
var body = jQuery('body');
jQuery(document).scroll(function() {
if (jQuery(document).scrollTop() > 0) {
if (!notTop) {
notTop = true;
body.addClass('not-top');
}
} else {