Adding 2 jQuery scripts into 1 file
<pre><code>&lt;script type="text/javascript" src="jquery-1.8.2.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.cycle.all.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen"/&gt;

&lt;script type="text/javascript"&gt;
$(document).ready(function() {
$('#slider').cycle({
    fx: 'scrollHorz',
    next:   '#next', 
    prev:   '#previous' 


});
});

&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.lightbox-0.5.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen"/&gt;

&lt;script type="text/javascript"&gt;
$(function() {
    $('a. lightbox').lightBox();
});
&lt;/script&gt;
&lt;/script&gt;
</code></pre>

<ol>
<li>The problem: When i use the code in separate files files, it works just fine, but when i add the lightbox to the carousel script or vice versa. Both of them stop working.</li>
</ol>

<p>I just started using <code>jQuery and plugins</code>. Ran into a problem and i don't quite know how to fix it, or whats wrong. I want to have a carousel and a lightbox in my website, but whenever i add the script, it goes, it stops working.</p>

<p>Got the source files for the lightbox from <a href="http://leandrovieira.com/projects/jquery/lightbox/" rel="nofollow">http://leandrovieira.com/projects/jquery/lightbox/</a> and the jquery library from the jquery website. for both the carousel and the lightbox. </p>

<p>Reply will be much appreciated.</p>

<p>Now the lightbox only works but not the carousel</p>

<pre><code>&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.cycle.all.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen"/&gt;

&lt;script type="text/javascript"&gt;
$(document).ready(function() {
$('#slider').cycle({
    fx: 'scrollHorz',
    next:   '#next', 
    prev:   '#previous' 

     // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
});
&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;&lt;script
type="text/javascript" src="js/jquery.lightbox-0.5.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen"/&gt;

&lt;script type="text/javascript"&gt;
$(function() {
    $('a.lightbox').lightBox();
});
&lt;/script&gt;
</code></pre>
