Check online frames converter! (Firefox 3.6+)
Для работы плагина необходимо подключить его скрипт и библиотеку jQuery (версию 1.3.2 или выше):
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"> </script>
<script type="text/javascript" src="jquery-beono-globus.js"></script>
<style>
.beonoGlobus {
position: relative;
overflow: hidden;
}
.loading {
background: url(loader.gif) no-repeat center center;
}
</style>
Необходимая html-разметка:
<div class="beonoGlobus">
<img alt="photo" src="product-photo-sprite.jpg"/>
</div>
<script type="text/javascript">
$(document).ready(function () {
$(".beonoGlobus").beonoGlobus({ framesCount: 16 });
});
</script>
Во время подключения плагина можно передать дополнительные параметры.
// Set rotation speed 50 ms and disable keybord control
$(".beonoGlobus").beonoGlobus({ rotationSpeed: 50, keyboardControl: false });
| Свойство | Описание |
| framesCount | (int) 0 |
| api | (string) all | last |
| rotationSpeed | (int) 100 |
| mouseTurns | (int) 2 |
| fadeInTime | (int) 0 |
| mouseControl | (boolean) true |
| keyboardControl | (boolean) true |
| rotateLeftButton | (string) jQuery selector |
| rotateRightButton | (string) jQuery selector |
| rotateResetButton | (string) jQuery selector |
| onReady | (function) true |
| onBeforeRoateLeft | (function) true |
| onAfterRoateLeft | (function) true |
| onBeforeRoateRight | (function) true |
| onAfterRoateRight | (function) true |
| onBeforeStop | (function) true |
| onAfterStop | (function) true |
// Set frames count and get last object
var obGlobus = $(".beonoGlobus").beonoGlobus({ framesCount: 10, api: "last"});
// Set auto rotation mode
obGlobus.setRotationMode("auto");
obGlobus.setRotationSpeed(50);
obGlobus.rotateLeft();
| Метод | Описание |
| setMouseControl(value) | (boolean) |
| getMouseControl() | (boolean) |
| setKeyboardControl(value) | (boolean) |
| getKeyboardControl() | (boolean) |
| setRotationMode(mode_name) | mode_name (string) auto | default |
| getRotationMode() | return (string) |
| setRotationSpeed(speed) | speed (int) |
| getRotationSpeed() | return (int) |
| rotateToFrame(frame_number) | frame_number (int) |
| rotateLeft() | |
| rotateRight() |