Jquery Trid Example

Side 1

Side 2

Side 3

Side 4

Side 5

Side 6

Jquery.trid Example


Welcome to Jquery.trid, a Jquery plugin which automatically converts DOM elements into a 3D scene using CSS3 Transforms. Try dragging the example around. Then drag the example while holding CTRL. Trid is designed for simplicity and a small basic app footprint.

Example DOM

<div id="view" style="z-index: -1">
<div id="box">
<div id="box1" class="sprite"><h3>Side 1</h3></div>
<div id="box2" class="sprite"><h3>Side 2</h3></div>
<div id="box3" class="sprite"><h3>Side 3</h3></div>
<div id="box4" class="sprite"><h3>Side 4</h3></div>
<div id="box5" class="sprite"><h3>Side 5</h3></div>
<div id="box6" class="sprite"><h3>Side 6</h3></div>

Example Code

$(function() {
a = 0;
window.setInterval(function() {

How to Use

Sets up the trid scene using this DOM object as the root. Returns the same selector.
Enables 3D transformation on this DOM element. XYZ represent position translation. RxRyRz represent rotation. SxSySz represent scaling. All transformations are applied to the parent DOM element's transform matrix (IE, transforms stack from parents to children). All transformations are optional and previous transformation settings will be preserved if they are not replaced with new numbers. All calls to trid() are buffered until the frame is resolved using tridTick(). Trid() returns the selector it was called from.
Applies all pending trid transforms.


Selecting is disabled across the DOM while trid captures the mouse. To disable this, call tridView() with no arguments.

As of writing this, the inner scrollbar of this div is broken due to Jquery 1.9.1 firing mousedown but not mouseup on it from the context of window. This is a documented bug in Jquery. There are workarounds but I have not put them in this example in case the bug is fixed. Thanks -Chase