This file contains 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
// http://stackoverflow.com/questions/3860351/relative-position-in-dom-of-elements-in-jquery | |
// What this does is .add() the additional element (or selector) | |
// (which jQuery keeps in document order) and then checks if it's the second of the two. | |
(function($) { | |
$.fn.isBefore = function(elem) { | |
if(typeof(elem) == "string") elem = $(elem); | |
return this.add(elem).index(elem) > 0; | |
} | |
})(jQuery) |
This file contains 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
// {{{ win-safari hacks, scratch this, | |
// let's just expose platform/browser to css | |
(function() | |
{ | |
var uaMatch = '', prefix = ''; | |
if (navigator.userAgent.match(/Windows/)) | |
{ | |
$('html').addClass('x-win'); | |
} |