That's right, and there was a space (since corrected) that didn't belong. That last only affected the pause/resume control. What I posted above was only an idea. Since then I set up a local demo and played around with it.
Slimbox is pretty flexible. After playing with this thing a bit, I came up with this page:
Code:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="agile_carousel/agile_carousel.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.js"></script>
<script src="agile_carousel/agile_carousel.a1.1.js"></script>
<script type="text/javascript" src="js/slimbox2.js"></script>
<link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" />
<script>
// Code used for "Flavor 2" example (above)
$.getJSON("agile_carousel/data.htm", function(data) {
$(document).ready(function(){
$("#flavor_2").agile_carousel({
// required settings
carousel_data: data,
carousel_outer_height: 330,
carousel_height: 230,
slide_height: 230,
carousel_outer_width: 480,
slide_width: 480,
// end required settings
transition_type: "fade",
transition_time: 600,
timer: 3000,
continuous_scrolling: true,
control_set_1: "numbered_buttons,previous_button,pause_button,next_button",
control_set_2: "content_buttons",
change_on_hover: "content_buttons"
});
$("#flavor_2 a.photo_link").not('*[href*=#]').slimbox({loop: true}, function(el) {
return [el.href, el.rev];
}, function(el) {
return true;
});
});
});
</script>
</head>
<body>
<div class="slideshow_wrapper slideshow_wrapper_single">
<div class="slideshow" id="flavor_2"></div>
<div class="slideshow_description">
<h1 class="slideshow_title">Slideshow:<br> Flavor 2</h1>
<ul class="slideshow_features">
<li>Horizontal "Content Buttons"
<ul><li>Triggered on Mouseover</li></ul></li>
<li>Numbered Buttons</li>
<li>Play/Pause Button</li>
<li>Prev & Next Buttons</li>
<li>Fading Transition</li>
</ul>
</div>
</div>
</body>
</html>
And this data (data.htm is the filename I used) file:
Code:
[{
"content": "<div class='slide_inner'><a class='photo_link' href='example.jpg' rev='It's Beautiful!'><img class='photo' src='images/banner_bike.jpg' alt='Bike'></a><a target='_blank' class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
"content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
"content": "<div class='slide_inner'><a class='photo_link' href='24.jpg' rev='Oooo Nooo, Mr. Bill!'><img class='photo' src='images/banner_paint.jpg' alt='Paint'></a><a target='_blank' class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
"content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
"content": "<div class='slide_inner'><a class='photo_link' href='25.jpg' rev='You were expecting the March of Dimes?'><img class='photo' src='images/banner_tunnel.jpg' alt='Tunnel'></a><a target='_blank' class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
"content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
"content": "<div class='slide_inner'><a target='_blank' class='photo_link' href='#'><img class='photo' src='images/banner_bike.jpg' alt='Bike'></a><a target='_blank' class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
"content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
"content": "<div class='slide_inner'><a target='_blank' class='photo_link' href='#'><img class='photo' src='images/banner_paint.jpg' alt='Paint'></a><a target='_blank' class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
"content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}]
Notes: I abandoned using rel="lightbox" and customized the Slimbox initialization used on the page to take in all a class photo_link tags within the flavor_2 div and make them a group while excluding href=# tags from initialization. I also made the rev attribute instead of the title be the caption, thus eliminating the 'tooltip' when hovering the trigger image in the Agile Carousel. I added the loop: true option to allow next/previous to span from beginning to end and visa versa. I abandoned using document ready with the on page Slimbox init because the document has to be ready already by the time we get there. And threw out the test for mobile devices on the assumption that the main Slimbox script already did that. That last might not be warranted. It can easily be added back in.
Bookmarks