background preloader

Continuous Integration and Deployment - CircleCI

Continuous Integration and Deployment - CircleCI

Hudson Continuous Integration CSS Sprites: What They Are, Why They're Cool, and How To Use Them By Chris Coyier On This article has been revised and re-written several times since its very first publication in 2007, to keep the information current. The most recent revision was done by Flip Stewart in January 2015. #What are CSS Sprites? Spoiler alert: they aren't fairies that write your stylesheets for you. To summarize: the term "sprites" comes from a technique in computer graphics, most often used in video games. CSS Sprites is pretty much the exact same theory: get the image once, and shift it around and only display parts of it. #Why use CSS Sprites? It may seem counterintuitive to cram smaller images into a larger image. Let's look at some numbers on an actual example: That adds up to a total of 14.38KB to load the three images. While the total image size (sometimes) goes up with sprites, several images are loaded with a single HTTP request. Thus, sprites are important for the same reasons that minifying and concatinating CSS and JavaScript are important. $ npm install sprity -g

Kotlin Programming Language SpriteMe jReject - jQuery Plugin for Simple Browser Rejection Grunt: Automated Testing With a look into our evolving JavaScript testing methods, Patrick shares how we're using Mocha, Jasmine, and Grunt. Introduction A few months ago we posted about our new build process, and we mentioned starting to use Grunt for the “freedom and customization” that it provided. Recently, Rob Tarr released a new application called Stuntman. Grunt to the Rescue Running both server and client-side JavaScript specs was an issue. Our solution: Test client side JavaScript with Jasmine Test our server side JavaScript with Mocha Not very challenging to do thanks to Grunt, but there are some important packages you will need. Prerequisites Grunt Setup Check out the example repository. Our basic setup consists of the following packages in our package.json file: Example “package.json” Gruntfile.js Setup Once you have your package.json and Gruntfile.js in a directory, install the packages with the following command (in your project directory): npm install Directory Structure Example Tests Client Server Running Tests

ImagesLoaded JavaScript is all like "You images done yet or what?" imagesloaded.desandro.com Detect when images have been loaded. Demo Edit this example on CodePen or try the jQuery example. Just to keep things interesting, there’s a 10% chance of adding a broken image. Install Get a packaged source file: Or install via Bower: bower install imagesloaded Or install via Component: component install desandro/imagesloaded Usage imagesLoaded( elem, callback ) new imagesLoaded( elem, callback ) elem Element, NodeList, Array, or Selector Stringcallback Function - function triggered after all images have been loaded Using a callback function is the same as binding it to the always event (see below). imagesLoaded( document.querySelector('#container'), function( instance ) { console.log('all images are loaded'); }); imagesLoaded( '#container', function() {...}); var posts = document.querySelectorAll('.post'); imagesLoaded( posts, function() { Events imagesLoaded is an Event Emitter. always done fail progress Properties jQuery

Magnific Popup: Responsive jQuery Lightbox Plugin Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device(for jQuery or Zepto.js). Examples Single image lightbox Three simple popups with different scaling settings. 1 — fits horizontally and vertically, 2 — only horizontally, 3 — no gaps, zoom animation, close icon in top-right corner. Lightbox gallery You may put any HTML content in each gallery item and mix content types. Zoom-gallery If you wish to open the popup only after image is fully loaded, you may preload image via JS. Popup with video or map In this example lightboxes are automatically disabled on small screen size and default behavior of link is triggered. Dialog with CSS animation Animations are added with simple CSS transitions, you can make them look however you wish.More animation effects on CodePen. Popup with form Entered data is not lost if you open and close the popup or if you go to another page and then press back browser button. Ajax popup Fast

Related: