Posts Tagged ‘jquery’

Creating a CSS3 3D image rotator

September 22nd, 2014 No Comments

A recent client project called for an image rotator that was essentially a 3D cube. I was pretty excited when I heard that, because I had not really had much of a chance to use any of the CSS3 3D stuff on a project yet!

Lets take a walk through the process of creating this slider!

First off, below is an example of the final product.

See the Pen CSS 3D Image Rotator by Ryan Christiani (@Rchristiani) on CodePen.


(more…)

jQuery CSS Multi-property getter

May 28th, 2013 No Comments

How many times have you wanted to get more than one property, say the margin or padding of an element with jQuery? After looking through the jQuery 1.9 release notes I saw that you can now use .css() to get many properties.

Now, apparently being able to set something like the padding short hand was something that you have be able to do for a while.


$('div').css('padding','1em 2em 3em 4em');

As of 1.9 you are now able to get multiple values:


var cssProps = $('div').css(['paddingTop','paddingRight','paddingBottom','paddingLeft']);

(more…)