Combining Jquery Cycle and Lightbox
Hi,
I've been trying to combine these two functions, with no luck .
Cycle works perfect on its own
So does Lightbox.
Here's the of my page :
- <!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>Untitled</title>
- <link href="css/lucas.css" rel="stylesheet" type="text/css" />
- <link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />
- <!-- Arquivos utilizados pelo jQuery lightBox plugin -->
- <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
-
- <script src="scripts/jquery-1.5.1.js"type="text/javascript"></script>
- <script type="text/javascript" src="scripts/grace-fade.js"></script>
- <script type="text/javascript" src="scripts/pngfix.js"></script>
- <!-- include Cycle plugin -->
- <script src="scripts/jquery.cycle.all.min.js"type="text/javascript"></script>
- <script src="scripts/scripts.js" type="text/javascript"></script>
- <style type="text/css">
- /* jQuery lightBox plugin - Gallery style */
- #slideshow {
- background-color: #FFF;
- padding: 0px;
- }
- #slideshow ul { list-style: none; }
- #slideshow ul li { display: inline; }
- #slideshow ul img {
- }
- #slideshow ul a:hover img {
- color: #fff;
- }
- #slideshow ul a:hover { color: #fff; }
- </style>
- </head>
- <body>
- <div id="container">
- <div class="menu">
- <div id="name" class="fade"><a href="javascript:ajaxpage('intro.html', 'content')"></a>
- </div>
- <div id="aw2011" class="fade"><a href="javascript:ajaxpage('aw2011.html', 'content') "></a></div>
- <div id="ss2011" class="fade"><a href="javascript:ajaxpage('ss2011.html', 'content') "></a></div>
- <div id="aw2010" class="fade"><a href="javascript:ajaxpage('ss2010.html', 'content') "></a></div>
- <div id="stocklists" class="fade"><a href="javascript:ajaxpage('stocklists.html', 'content') "></a></div>
- <div id="press" class="fade"><a href="javascript:ajaxpage('press.html', 'content') "></a></div>
- <div id="info" class="fade"><a href="javascript:ajaxpage('info.html', 'content') "></a></div>
-
- </div>
- </div>
- <div id="content"></div>
- </div>
- </body>
- </html>
Here's the script :
- function ajaxpage(url, containerid) {
- var $container= $('#' + containerid);
- $container.hide().load(url, function() {
- $container.fadeIn();
-
- $(function() {
- $('#slideshow img:first').fadeIn(7000, function() {
-
- });
- });
-
- $('.slideshow')
- .cycle({
- next: '#next2',
- prev: '#prev2',
- fx: 'fade',
- speed:'1500',
- timeout: 0,
-
- after: function() {
- var alt = $(this).attr('alt');
- // do something with alt text
- $('#someElement').html(alt);
- }
- });
-
-
- });
-
- }
- $(function() {
- $('#slideshow a').lightBox();
- });
-
// JavaScript Document
Is there an issue with the versions of Cycle, Jquery, Lightbox i'm using??
Am i supposed to use 'NO CONFLICT' somewhere?
Any ideas or help??
Thank you for your time.
x