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
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "#22B5BF", | |
| "@brand-success": "#88C134", |
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
| $('.item').hover( | |
| function() { | |
| $(this).find('.author').addClass('hover') | |
| }, | |
| function() { | |
| $(this).find('.author').removeClass('hover') | |
| } | |
| ) |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Emmet Snippets</title> | |
| </head> | |
| <body> | |
| <h1>Emmet Snippets</h1> | |
| <p>Shortcut examples</p> | |
| <ul class="snippets"> |
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
| /* | |
| LayoutBreakpoints - Sync JS with your CSS media queries - yay! | |
| After painfully discovering that there is no hope for IE7 (and others) to read | |
| content properties with generated content, I resolved to this solution. | |
| If it doesn't work for you, you could easily change getElementsByTagName to | |
| getElementsById and pop an ID attribute onto an element of your choosing. | |
| See an example here: http://replete.github.io/FitTextNow/example.html (view-source) |
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
| // Hastily plonked together by @replete, [email protected] | |
| /* Use like this: | |
| <div class="some-html-chunk" data-sync-height="a-unique-name">Foo</div> | |
| <div class="some-other-html-chunk" data-sync-height="a-unique-name">Bar</div> | |
| */ | |
| $('[data-sync-height]') | |
| .each(function(i,e){ |
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
| (function($){ | |
| $.fn.autoGrowInput = function(o) { | |
| o = $.extend({ | |
| maxWidth: 1000, | |
| minWidth: 0, | |
| comfortZone: 70 | |
| }, o); |
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
| var d = document, | |
| b = d.getElementsByTagName("body"), | |
| w = window, | |
| c = "className", | |
| v = (function() { return w.innerWidth || d.documentElement.clientWidth }), | |
| r = function () { | |
| i = v(); | |
| if (i < 181) { b[0][c] = "max-180"; return } | |
| if (i < 246) { b[0][c] = "max-245"; return } | |
| else { b[0][c] = "" } |
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
| //jQuery | |
| if ( $(".some-element").filter(":focus").length >= -1 ) { | |
| //$(".some-element") contains 1 item, and it is focussed | |
| } | |
| if($(".some-element")[0] == document.activeElement) { | |
| //first element of object is selected | |
| } |
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
| //jQuery | |
| $("#swapImg") | |
| .attr("src", "dynamic-image-url.jpg") | |
| .one("load",function(){ | |
| //image has loaded | |
| }) | |
| .each(function(){ | |
| if(this.complete) //trigger load if cached in certain browsers | |
| $(this).trigger("load"); |
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
| /* -------------------------------------- */ | |
| //iOS-like scrollbar | |
| var $niceScrollContainers = $("[data-ios-scroll]"); | |
| $niceScrollContainers.each(function () { | |
| var $container = $(this), | |
| scrollClass = $container.attr("data-ios-scroll"), | |
| cursorWidth = "6px", | |
| $contentsLastChild = $container.children("*:last-child"); |