If you don't mind tech-related ads, and want to keep us running, whitelist JSFiddle in your ad blocker.
Thank you! ❤️
For finding how far away something should be when it's off at some funny angle.
Using an array of sources and resolving a Deferred for each one and then doing stuff when they're all resolved.
This is meant for use with Underscore's "groupBy" method, when you're using an iterator function to sort by a deeper property.
Just playing around with it, and throttling the move event.
_renderItemData is internal, and you don't want to override it. You don't even want to encounter it, really. This custom widget avoids that trouble.
Doing some stuff when each Deferred Object resolves, and doing some other stuff only when ALL of them have resolved.
Get the height of the content inside the content container.
Identifying the browser's event for the end of a CSS transition, and tossing that into a jQuery listener.
Due to a weird situation at work (caused by the Marketing Department) I have to do this clunky thing to get images centered with CSS alone.
Telling AngularJS to wait up while multiple data sources come in.
Sort of like tabs, but independent of markup. Shows corresponding content when a link is clicked.
Checking out specificity and how !important things can be. EVEN YOU can override an inline style!
Neat CSS selector that Alyssa Nicoll posted on Twitter.
Responsive horizontal nav menu that only drags to its edges. Still not totally happy with the right side. Might round off the list items to keep fractions out of the mix.
Needed to make an example with an older version for work.
Nothing fancy, just playing around.
Goes from a full-width input to a couple of inline half-width inputs, gutter included. Triggered with a button, shown/hidden with CSS.
Reductive filter for when you have a bunch of divs and you want to find one with a partial name.
Filter a Bloodhound dataset dynamically. Sort results according to cagegory.
Here we have a local data object instead of a server URL, By overriding some internal methods, we can control the output.
Filter a Bloodhound dataset dynamically
Just a syntax example for reference.
jQuery does lots of cool stuff, but it isn't necessary every time. You can get a surprising amount of stuff done with the event object.
Adding content in one shot by putting it all into a fragment first.
Define a list of things to do on resize and add to it at any time later. Uses Ben Alman's throttle/debounce plugin to keep calls down to once per 250ms.
Wanted to use a sprite without a library of any kind. Practiced tile animation, translating the context and flipping the image.
Returns true if the dropoff locations have any numbers in common with the pickup locations.
Another snowfall example, inspired by the many blizzards which have hit Maine recently. Also making use of the Visibility API, because IE<=9 can go to hell.
Just playing around with the way lists can be displayed as tables.
No matter where the line is, the dots will go from start to finish. Change the startPoint/endPoint variables to see different results.
For a set of items that need to toggle their content. Just put "toggler" class on anything that needs to toggle the next div after it.
Forked from Jeff's fiddle.
Just looking through the docs and playing around with the framework.
Just a thing I had to make for work. Thought I would post it somewhere, and it seems a bit small to put on its own GitHub page.
Use a button to show/hide another element in the same container, whether or not it's a direct sibling.
Just a performance tester. You can add any number of bouncers and see the resulting frame rate.
Playing around with private vs. public variables.
Basic syntax drill, with amusing subject matter.