I am working on the cube gallery to display the cubes. I am getting an error:
Uncaught ReferenceError: Gallery is not defined fiddle.jshell.net:722
How to fix the error?
My fiddle is also below:
Providing my code below:
<script type="text/javascript">
/*
|------------------------------------------|
| MelonHTML5 - 3D Cube Gallery |
|------------------------------------------|
| @author: Lee Le (lee@melonhtml5.com) |
| @version: 1.02 (09 Jan 2013) |
| @website: www.melonhtml5.com |
|------------------------------------------|
*/
Gallery = {
_config: {
speed: 500,
size: 100,
lightbox: !0,
closeOnEsc: !0,
animation: "default",
slideshow: !1,
slideshow_speed: 3E3,
cube_speed: 1E3
},
lightbox_speed: 300,
window_width: null,
window_height: null,
_cube_timeout: null,
_gallery: null,
_overlay: null,
_lightbox: null,
_current: null,
_in_slideshow: !1,
init: function() {
Gallery._buildContainer(!0, !0);
Gallery.window_width = $(window).width();
Gallery.window_height = $(window).height();
$(document).keydown(Gallery.Events.keyDown);
$(window).resize(Gallery.Events.windowResize);
Gallery._startCube()
},
您甚至在定义Gallery
之前调用Gallery.setOptions({...})
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.