jbgallery is a webpage UI widget written in javascript on top of the jQuery library.
Its function is to show a single big image, multiple images, multiple gallery, slideshow, as site's background or in "dialog" mode or as a common pop-up
jbgallery has two basic menus, one has music player buttons the other gives directly links to single images.
jbgallery provides a pubblic API to remote control the component, so it would be easier to bind also with a more complex menu (i.e. with thumbnails).
Examples:
Or download single files :
<script type="text/javascript" src="jquery.1.3.2.min.js"></script> <script type="text/javascript" src="jbgallery-1.0.min.js"></script>
<div class="jbgallery">
<ul>
<li><a href="1.jpg" title="alternative text">1</a></li>
<li><a href="2.jpg" title="alternative text">2</a></li>
<!-- etc -->
</ul>
</div>
<script type="text/javascript">
jQuery(window).jbgcss("jbgallery.css");//customize url
jQuery(document).ready(function(){
jQuery(".jbgallery").jbgallery();
});
</script>
Write options HERE :
jQuery(".jbgallery").jbgallery({HERE});
{
style : "zoom", //"centered", "zoom"
slideshow : false,
menu : "simple", //false, "numbers", "simple"
interval : 4000,
fade : false,
fade_time : 400,
shortcuts : [37,39], //left and right arrows
before : function(){}
load : function(ev){},
after : function(ev){},
popup : false,
close : function(ev){},
labels : {
play : "play",
next : "next",
prev : "prev",
stop : "stop",
close: "close"
}
}
{
play : "play",
next : "next",
prev : "prev",
stop : "stop",
close: "close"
}To add to the image further contents or other kind of elements you can use the following div. Otherwise you can add other divs copying the styles below.
<div id="jbg-content">
<!-- PUT HERE CONTENT -->
<div id="docs">
<div class="wrapper">
</div>
</div>
<!-- /PUT HERE CONTENT -->
</div>
#docs{width:500px;right:200px;top:15%;position:absolute;z-index:1000;}
#docs .wrapper{padding:10px;margin:10px;background:#fff;}
I can't prevent on the keydown default event (arrows) in Opera.
At "arrows" keydown that causes a pervers effect.
If you know a solution, please contact me.
The component is published with a minimalist graphic layout.
You are free to customize css and to ask me any change to add classes to the simple menus edited by me.
If you use API or design more complex menus, or if you write plugins populating html lists via ajax by flickr
or similar services, please share with me for the next version of this plugin.
This work is inspired by http://www.ringvemedia.com/ and Chicca
Photos by Chicca Vancini
Depends by jquery-1.3.2 by John Resig.
Post a comment in my blog.
http://maxb.net/blog/
Copyright (c) 2009 Massimiliano Balestrieri
Licensed GPL licenses:
http://www.gnu.org/licenses/gpl.html