Forked from Chris Steurer's Pen Product Hover Display Cards.
A Pen by A Non Ymous on CodePen.
Forked from Chris Steurer's Pen Product Hover Display Cards.
A Pen by A Non Ymous on CodePen.
github repo for this pen: https://github.com/legomushroom/velocity
A Pen by LegoMushroom on CodePen.
A demo showing multiple split types and effects. More codepen demos here: http://codepen.io/collection/KiEhr/
Forked from GreenSock's Pen SplitText: Multiple Split Types.
A Pen by Secret Sam on CodePen.
Drag and throw elements and watch them continue naturally with momentum, respect bounds and optionally snap to a grid. This is the demo seen at http://www.greensock.com/draggable/
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.js"></script> | |
<script> | |
(function Templify(undefined) { | |
var models = {}; | |
function replace(template, pattern, value){ | |
var expression = new RegExp('\\['+pattern+'\\]'); |
var ko = require('knockout'); | |
ko.components.register('simple-name', require('./components/simple-name/simple-name.js')); | |
ko.applyBindings({ userName: ko.observable() }); |
Choose a ticket class: <select id="tickets"></select> | |
<p id="ticketOutput"></p> | |
<script id="ticketTemplate" type="text/x-jquery-tmpl"> | |
{{if chosenTicket}} | |
You have chosen <b>${ chosenTicket().name }</b> | |
($${ chosenTicket().price }) | |
<button data-bind="click: resetTicket">Clear</button> | |
{{/if}} |
(function(knockout){ | |
var knockoutElementMapping = function(knockoutElement, dataElement) | |
{ | |
if(typeof(knockoutElement.mergeConstructor) == "undefined") | |
{ | |
if (!knockout.isComputed(knockoutElement)) | |
{ | |
if(knockoutElement.mergeMethod) | |
{ knockoutElement.mergeMethod(knockoutElement, dataElement); } |
//make a limited set of underscore functions transparently unwrap knockout observables | |
(function knockoutifyUnderscore(_) { | |
var unwrap = ko.utils.unwrapObservable; | |
//These can be shimed in a standard way | |
var koFriendly = ['map', 'filter', 'find', 'each', 'findBy', 'first', 'last', 'head', 'tail', 'union', 'compact', 'flatten', 'difference', 'without']; | |
var oldMap = _.map; | |
for (var _i = 0; _i < koFriendly.length; _i++) { | |
(function(fnName) { | |
var originalFn = _[fnName]; |