Your browser (Internet Explorer 7 or lower) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.

X

Navigate / search

jQuery Image Cloning Script

I recently ran into an issue at work where we have been spending countless hours making 6 and 12 bottle shots by hand in Photoshop. We would take one bottle and copy/clone it over 6 or 12 times, then save and resize the image for the web. It became so repetitive that I created a little script that would do the same thing, but only using one image and some fancy jQuery.

Here is my script:

JavaScript and jQuery

%MINIFYHTMLc2849d78a81764303f8dac9b49e9db6e8%%MINIFYHTMLc2849d78a81764303f8dac9b49e9db6e9%

CSS to float the images left:

%MINIFYHTMLc2849d78a81764303f8dac9b49e9db6e20%

HTML to display the images:


See it in action:
jQuery Bottle Clone Example

Leave a comment

name

email (not published)

website