Magic 360™ integration
Spin your products in gorgeous 360° rotation.
1. Demo
Magic 360™ can be customized in many ways. This page explains how. For inspiration try these 9 examples.
2. Installation
Quick install:
- Download the Magic 360™ demo (zip).
- Upload the magic360 folder to your server.
- Use the wizard to create the HTML for your spin.
- Copy and paste the HTML into your page.
Detailed install:
- Download the Magic 360™ demo (zip).
- Upload the magic360 folder to your server.
- Reference the magic360.js and magic360.css files before your </head> tag. (If you cannot access the head section of your page, reference the files elsewhere such as the main content of your page.)
- Insert an <img> tag for the first image in your spin. Wrap an <a> tag around it with a class of Magic360 and href of #.
- Add a rel tag with the filename parameter (described in detail below).
A basic HTML page could look like this:
<html>
<head>
<title>Magic 360 example</title>
<link type="text/css" rel="stylesheet" href="magic360/magic360.css"/>
<script src="magic360/magic360.js" type="text/javascript"></script>
</head>
<body>
<p><a href="#" class="Magic360" rel="filename:ring-{col}.jpg;"><img src="ring-01.jpg" alt=""/></a></p>
</body>
</html>
Video tutorial:
This 6 minute tutorial shows you how to install and customize Magic 360™.
3. Naming your images
Your images should have filenames which identify the sequence they should appear in. For example, a 36 image spin might have filenames like this:
- ring-01.jpg
- ring-02.jpg
- ring-03.jpg
- etc...
- ring-34.jpg
- ring-35.jpg
- ring-36.jpg
File names can be anything providing there is a sequence of numbers. These will be referenced using {col} for example: ring-{col}.jpg. Step 3 below shows you how.

A multiple-row spin, which can rotate images up/down as well as left/right, should have a numbered sequence for the row and the column. For example, a spin with 12 columns and 3 rows might have filenames like this:
|
|
|
The first number is the row and the second number is the column. These will be referenced using {col} and {row} for example: ring-{row}-{col}.jpg.
Numbers can be anywhere in the filename, with or without hyphens. The only requirement is that they follow a common sequence starting at 01 for the first column and row. File numbering should use 2 digits i.e. 01, 02, 03, not a single digit like 1, 2, 3. If you need to rename many files, a quick method is to use this free File Renamer program.
4. Referencing images
To reference your images, create an <img> tag for the first image you want to show. It does not need to be the image with the number 01, it can be any of the images within your spin (see "The first image"). For example:
<img src="ring-01.jpg"/>
You should describe the file naming format of your images with the filename parameter. Where the column or row numbers appear in your file names, use {col} or {row}. For example:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg;"><img src="ring-01.jpg"/></a>
If your spin has 36 images in 1 row, then you are all done as those are the default values expected by Magic 360™. If you have a different number, you should specify the number of columns and rows that make up your spin. This example is for a spin with 12 columns and 3 rows (36 images in total):
<a href="#" class="Magic360" rel="filename:ring-{row}-{col}.jpg; rows:3; columns:12;"><img src="ring-01-01.jpg"/></a>
5. Magnifier
A magnifier can be shown if you have a set of large images (example: small image 260px width, large image 800px width).
To show the magnifying glass:
- Specify the large image location in the href.
- Specify the structure of your file names with the magnify-filename parameter.
- Set the magnify parameter to true.
For example:
<a href="shoe-big-01.jpg" class="Magic360" rel="filename:shoe-{col}.jpg; magnify:true; magnify-filename: shoe-big-{col}.jpg;"><img src="shoe-01.jpg"/></a>
6. Magnifier size
The magnifying glass will automatically show 80% of the image width. You can adjust this percentage, for example:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; magnify:true; magnifier-size:100%;"><img src="ring-01.jpg"/></a>
Or you can set the size in pixels, for example:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; magnify:true; magnifier-size:250px;"><img src="ring-01.jpg"/></a>
7. Multiple rows
To create a 3D spin that rotates up/down as well as left/right, the product should be photographed in different vertical positions (rows). In the rel tag, specify the number of rows and columns in your spin.
This example has 4 rows with 12 columns per row (48 photos in total):
<a href="#" class="Magic360" rel="filename:ring-{row}-{col}.jpg; rows:4; columns:12;"><img src="bag-01-01.jpg"/></a>
To add a magnifier, link the href to the large image, specify the filename structure using the magnify-filename parameter and set the magnify parameter to true. For example:
<a href="bag-big-01-01.jpg" class="Magic360" rel="filename:bag-{row}-{col}.jpg; magnify-filename: bag-big-{row}-{col}.jpg; magnifier:true; columns:12; rows:4;"><img src="bag-01-01.jpg"/></a>
8. The first image
You can choose any image as the first one displayed in your spin. Specify your chosen image in the <img src="">. For example:
Start at column 16:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg;"><img src="ring-16.jpg"/></a>
Start at column 1:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg;"><img src="ring-01.jpg"/></a>
9. Spin method
The image can spin on mouse hover or on drag. The default is drag and on touch-screen devices (iPhone, iPad etc) it will always spin on drag (without a cursor, there is no such thing as hover!).
To spin the image on hover, set the spin parameter to hover like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; spin:hover;"><img src="ring-01.jpg"/></a>
10. Auto-spin
Draw attention to your spin by making it to spin automatically. By default, it will spin once on page load.
You can set it to spin on hover or on click or any combination. For example, to make it spin on page load and again on hover, use the autospin-start parameter like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; autospin-start:load,hover;"><img src="ring-01.jpg"/></a>
You can set the autospin parameter to spin twice on page load like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; autospin:twice;"><img src="ring-01.jpg"/></a>
Or set it to spin infinitely like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; autospin:infinite;"><img src="ring-01.jpg"/></a>
An infinite autospin will stop upon click. You can prevent user intervention to make it spin forever, like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; autospin:infinite; autospin-stop:never;"><img src="ring-01.jpg"/></a>
Turn off autospin completely like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; autospin:off;"><img src="ring-01.jpg"/></a>
The autospin will automatically start with the row / column specified in the src. In the unlikely event that you want to start the autospin from a different image, you can specify another row and column by using the start-row and start-column parameters, like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; columns:12; rows:4; start-column:6; start-row:3"><img src="bag-01-01.jpg"/></a>
11. Direction
The image will rotate clockwise by default. You can make it rotate anti-clockwise like so:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; autospin-direction:anticlockwise;"><img src="ring-01.jpg"/></a>
12. Speed
You can speed up or slow down the rotation speed. The default is 50. Make it faster by increasing the number (maximum 100) or slow it down by decreasing the number (minimum 1). For example:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; speed:80;"><img src="ring-01.jpg"/></a>
13. Smoothing
Smoothing will gradually slow down the image when you stop spinning it. You can remove smoothing by setting the smoothing parameter to false. For example:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; smoothing:false;"><img src="ring-01.jpg"/></a>
14. Loading message
A progress bar displays over your product while the images are downloading:
You can change the "Loading..." text by setting the loading-text parameter with a Magic360.lang object. For example:
<script type="text/javascript">
Magic360.lang = {
'loading-text': 'Herunterladen...'
};
</script>
You can change the colors, size and borders of the loading bar. This example changes colors to green, increases border width, reduces the div width / height, removes the animation and reduces rounded corners:
Here are the edited styles to achieve that look:
.Magic360 .progress > div > div {
-webkit-border-radius:2px;
-moz-border-radius:2px;
border-radius:2px;
}
.Magic360 .progress {
background:rgba(143,180,22,0.2);
width:160px;
border:2px solid #939393;
border:2px solid rgba(143,180,22,0.6);
-webkit-border-radius:4px;
-moz-border-radius:4px;
-o-border-radius:4px;
border-radius:4px;
color: #5B7505;
}
.Magic360 .progress .bar .state {
background:rgba(255,255,255,0.8);
border:1px solid rgba(143,180,22,0.8);
height:6px;
}
You can remove the loader entirely by setting the height to zero:
.Magic360 .bar .state {
height: 0px;
}
If the user clicks to zoom in, this animated GIF is displayed while the large image is downloading:
![]()
You can change that loading GIF by editing this style in magic360.css:
.Magic360 .icon-load {
background: url('graphics/loader.gif');
width: 42px;
height: 42px;
}
15. Initialization
The images in your spin will download automatically once the DOM is ready (i.e. once the rest of the page has downloaded). The first image to download is the main image declared in the <img>, then the other images will be fetched while the "Loading..." message is shown.
This provides the best/fastest user experience but uses the largest data transfer on your server. You can reduce data transfer by changing the initialize-on parameter to download the images on hover or click. For example:
<a href="#" class="Magic360" rel="filename:ring-{col}.jpg; initialize-on:hover;"><img src="ring-01.jpg"/></a>
Magnified images always download on demand if/when the user clicks to zoom in. They don't download on DOM ready (to save on data transfer).
16. API
Use the Magic 360™ API commands to change your images dynamically (AJAX):
- Magic360.start() - Start all spins
- Magic360.start(id) - Start spin by id
- Magic360.stop() - Stop all spins
- Magic360.stop(id) - Stop spin by id
- Magic360.spin(id/*, frames*/) - Spin image by +/-XX frames. If frames omitted, start infinite spin.
- Magic360.magnifyOn(id) - Turn on Magnify mode on a particular spin by #id
- Magic360.magnifyOff(id) - Turn off Magnify mode on a particular spin by #id
Some examples of how you could use the API:
|
|
![]() |
In the examples, the shoe has an id of spin-1. Here is the HTML for those 8 buttons:
<button onclick="Magic360.start('spin-1');">Start Magic 360</button>
<button onclick="Magic360.spin('spin-1');">Spin shoe</button>
<button onclick="Magic360.pause('spin-1');">Pause spin</button>
<button onclick="Magic360.spin('spin-1', 1);">1 frame forward</button>
<button onclick="Magic360.spin('spin-1', -1);">1 frame backward</button>
<button onclick="Magic360.magnifyOn('spin-1');">Turn on magnifier</button>
<button onclick="Magic360.magnifyOff('spin-1');">Turn off magnifier</button>
17. JavaScript callbacks
You can trigger events once all images have loaded by defining a function for the callback onready. It has all sorts of potential uses - you could allow a user to switch sets of 360 images on a page or you could show some text over a spin once it is ready to use.
The following example will display an alert "360 is ready":
Magic360.options = {
'onready': function(spinA) { alert('360 is ready'; }
};
Or you could trigger it like so:
'onready': onMagic360Ready
};
function onMagic360Ready(spinA){
alert('360 is ready';
}
In those examples, spinA is the ID of the particular spin on your page with id="spinA", allowing you to choose a particular spin if you have more than one on the page.
18. Buttons
You can change the 360 / magnify icons that show in the top right corner. Choose between the icons below that come with Magic 360™, or design your own!
Horizontal buttons
Vertical buttons
To use vertical buttons, open magic360.css and change the width, height and URL in the style .Magic360 .controls, for example:
.Magic360 .controls {
cursor: pointer;
width: 32px;
height: 64px;
background: url('graphics/icons01v.png');
}
Change the styles .Magic360 .controls.magnify and .Magic360 .controls.spin like so:
.Magic360 .controls.magnify {
background-position: 32px 0px;
}
.Magic360 .controls.spin {
background-position: 0px 0px;
}
19. Button text
The text shown on hover over the buttons can be adjusted. This is particularly useful for multi-language websites. Specify Magic360.lang and the parameters button-magnify and button-spin, like so:
<script type="text/javascript">
Magic360.lang = {
'button-magnify': 'Switch to magnify mode',
'button-spin': 'Switch to 360 mode'
};
</script>
To change the font and color of the text, open magic360.css and add the style .MagicToolboxTooltip with your preferred font settings, for example:
.MagicToolboxTooltip {
font-family:"Open Sans", sans-serif;
font-size:14px;
color: #712929;
}
This is how it could look:

20. Ways to apply settings
There are 2 ways to change parameters:
1. Apply parameters via the rel attribute, for example:
<a href="#" class="Magic360" rel="filename:ring-{row}-{col}.jpg; columns:32"><img src="ring-01-01.jpg"/></a>
2. Or, apply parameters globally (to all spins on the page) with a script tag. For example:
<script type="text/javascript">
Magic360.options = {
'speed': 80,
'autospin': 'twice'
};
</script>
If you use asynchronous JavaScript loading, use Magic360Options (instead of Magic360.options). For example:
<script type="text/javascript">
Magic360Options = {
'autospin-direction': 'anticlockwise'
};
</script>
Likewise, for asynchronous JavaScript loading, use Magic360Lang (instead of Magic360.lang). For example:
<script type="text/javascript">
Magic360Lang = {
'loading-text': 'Herunterladen...'
};
</script>
Be sure to add commas after all variables, except the last one (or IE will give an error).
21. Parameters
| Parameter | Default | Options | Description |
|---|---|---|---|
| Common settings | |||
| filename | e.g. your-image-name-{row}-{col}.jpg | The format of your image file names. Required. | |
| columns | 36 | numeric | Number of images per row (required unless spin has 36 images). |
| rows | 1 | numeric | Number of images per column (required if more than 1 row). |
| speed | 50 | 0-100 | Speed of spin (100 = fast). |
| Autospin | |||
| autospin | once | once / twice / infinite / off | Automatically spin the image. |
| autospin-start | load | load / hover / click / or combination e.g. load,hover | Start autospin on page load, click or hover. |
| autospin-stop | click | click / hover / never | Stop autospin on click, hover or never. |
| autospin-direction | clockwise | clockwise / anticlockwise | Direction of spin. |
| Magnifier | |||
| magnify | false | true / false | Show larger images on click. |
| magnifier-size | 80% | % of small image width or fixed size in px | Size of the magnifier. |
| magnify-filename | e.g. your-bigimage-name-{row}-{col}.jpg | The format of your large image file names. | |
| magnify-filepath | e.g. /your/image/location/ | Folder for large images. Only needed if different from href folder. | |
| Other settings | |||
| initialize-on | load | load / hover / click | When to download the images. |
| spin | drag | drag / hover | Method for spinning the image. |
| smoothing | true | true / false | Smoothly stop the image spinning. |
| filepath | e.g. /your/image/location/ | Folder for images. Only needed if different from img src folder. | |
| loop-column | true | true / false | Continue spin after the last image on X-axis. |
| loop-row | false | true / false | Continue spin after the last image on Y-axis. |
| start-column | auto | numeric or auto | Start spin with image in src or specify another column. |
| start-row | auto | numeric or auto | Start spin with image in src or specify another row. |
30 day money-back guarantee.
Free license for non-commercial use
30 day money-back guarantee.
Free license for non-commercial use.
30 minutes free technical support.





