ok for me this code works well
I used mootools 1.2.1 uncompressed
and slimbox 1.69
with this you can try by yourself ^^
have a nice day :)
Start---------------index.htm--------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
<script language="javascript" type="text/javascript"
src="mootools-1.2.1-core-nc.js"></script>
<script language="javascript" type="text/javascript"
src="slimbox.js"></script>
<link rel="stylesheet" type="text/css" href="css/slimbox.css">
</head>
<body>
<style media="screen">
#sasasa { border:1px solid #000; }
</style>
<script type="text/javascript">
window.addEvent('domready', function () {
$('sasasa').getElements('a').each(function(el) {
el.addEvents({
'click': function(e){
e.stop(); // preventing event click otherwise go on href
proprierties page
var a, id_gallery; //a is not important;
a = el.getProperty('id').split('_');
id_gallery = a[1];
var myRequest = new Request.HTML({
url: 'gallery.htm?coleccion=' + id_gallery,
method: 'get',
evalResponse: true, // this is very important because with this
the new DOM is evaluated and can be parsed by javascript
onSuccess: function(responseText,responseXML, responseHTML) {
$('loading').set('html', responseHTML+'ok');
Slimbox.scanPage();
},
onRequest: function() {
$('loading').set('html', '<p class="load"><span>Cargando
imágenes</span></p>');
},
onFailure: function (aa) {
$('loading').set('html', $('loading').get('html') + 'failure');
}
}).send();
}
});
});
});
</script>
<h3>Colecciones</h3>
<ul id="sasasa">
<li><a href="gallery.htm" id="gallery_29">aaaaaaa</a></li>
<li><a href="gallery.htm" id="gallery_30">bbbbbbbbb</a></li>
<li><a href="gallery.htm" id="gallery_32">ccccccccccc</a></li>
<li><a href="gallery.htm" id="gallery_34">ddddddddd</a></li>
<li><a href="gallery.htm" id="gallery_33">eeeeeeeeeee</a></li>
<li><a href="gallery.htm" id="gallery_31">fffffffff</a></li>
</ul>
<div id="loading">
<div id="gallery">
<h3>Galería de artículos</h3>
<a href="images/123_b.jpg" rel="lightbox[galeria]"><img
src="images/123.jpg" /></a>
<a href="images/456_b.jpg" rel="lightbox[galeria]"><img
src="images/456.jpg" /></a>
<a href="images/789_b.jpg" rel="lightbox[galeria]"><img
src="images/789.jpg" /></a>
<a href="images/146_b.jpg" rel="lightbox[galeria]"><img
src="images/146.jpg"></a>
<a href="images/169_b.jpg" rel="lightbox[galeria]"><img
src="images/169.jpg" /></a>
</div>
</div>
</body>
</html>
End----------------index.htm--------------------------
Start---------------gallery.htm------------------------
<div id="gallery">
<h3>title</h3>
<a href="images/123_b.jpg" rel="lightbox[galeria]"><img src="images/
123.jpg" /></a>
<a href="images/789_b.jpg" rel="lightbox[galeria]"><img src="images/
789.jpg" /></a>
</div>
End ---------------gallery.htm------------------------
On Jul 17, 9:42 am, Massimo Barilari <
mbaril...@gmail.com> wrote:
> ok.. let me make an example page.. I'll post as soon as possible
>
> 2009/7/16 Jairo Ochoa <
jairo.oc...@gmail.com>
>
>
>
> > I did included the js at the end of slimbox.js and fails
> > I also tried to put it inside the page which is called from the ajax and
> > fails
>
> > have you test it succesfully at any web site?
> > please say the url and I check teh code
>
> > thanks!
> > --
>
> > 2009/7/16 Dj-yossi <
djyo...@gmail.com>