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
(function($){ | |
$.fn.redraw = function(){ | |
return $(this).each(function(){ | |
var n = document.createTextNode(' '); | |
$(this).append(n); | |
setTimeout(function(){n.parentNode.removeChild(n)}, 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
// Chosen, a Select Box Enhancer for jQuery and Prototype | |
// by Patrick Filler for Harvest, http://getharvest.com | |
// | |
// Version 0.9.15 | |
// Full source at https://github.com/harvesthq/chosen | |
// Copyright (c) 2011 Harvest http://getharvest.com | |
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md | |
// This file is generated by `cake build`, do not edit it by hand. | |
(function() { |
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
// If it's a relative path, we need to make it absolute, using the | |
// reader's location (not the active component's location). | |
if (!url.match(/^\//)) { | |
var link = document.createElement('a'); | |
link.setAttribute('href', url); | |
url = link.href; | |
delete(link); | |
} |
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
[ | |
{ | |
"spec name": "CSS Animations", | |
"uri": "http://www.w3.org/TR/css3-animations", | |
"category": "css-property", | |
"Name": "animation-name", | |
"Value": "<single-animation-name> [\n ‘,’ <single-animation-name> ]*", | |
"Initial": "‘none’", | |
"Applies To": "all elements, ::before and ::after pseudo-elements", | |
"Inherited": "no", |
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
// Defines prefixed versions of the | |
// transitionEnd event handler | |
transitionFinishedEvents = { | |
'WebkitTransition' : 'webkitTransitionEnd', | |
'MozTransition' : 'transitionend', | |
'OTransition' : 'oTransitionEnd', | |
'msTransition' : 'msTransitionEnd', | |
'transition' : 'transitionEnd' | |
}; | |
// Define the correct transition event for this UA |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
function randomColor(){ | |
return "rgb("+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+")"; | |
} | |
function showBoxes(window) { | |
var rects = []; | |
function getRects(node){ | |
var range = window.document.createRange(); | |
range.setStartBefore(node); | |
range.setEndAfter(node); |
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
function createStyle(styleText) { | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
// <style> element must be appended into DOM before setting `cssText` | |
// otherwise IE8 will interpret the text in IE7 mode. | |
document.body.appendChild(style); | |
if (style.styleSheet) { | |
style.styleSheet.cssText = styleText; | |
} else { |
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
// Modernizr style test | |
if (!(window.webkitMatchMedia || window.mozMatchMedia || window.oMatchMedia || window.msMatchMedia || window.matchMedia)) { | |
var root = document.getElementsByTagName( 'html' )[0]; | |
root.className += ' no-matchmedia'; | |
} | |
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license - IE8 VERSION! */ | |
window.matchMedia = window.matchMedia || (function(doc, undefined){ | |
var docElem = doc.documentElement, |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<!--允许全屏--> | |
<meta content="yes" name="apple-mobile-web-app-capable"/> | |
<meta content="yes" name="apple-touch-fullscreen"/> | |
<!--禁止电话号码和邮箱识别--> |
OlderNewer