jQuery carousel click updates selected item in a select list?
<p>I'm trying to hook up the click event on a jQuery image carousel's images so that it updates a select list in the same document and sets the "selected" option to match the item that was clicked in the carousel. The "title" attribute on each of the carousel images matches at least one option in the select list (title is always unique).</p>

<p>For example: </p>

<p>1) carousel image titles are: image1, image2, image3</p>

<pre><code>&lt;div id="carousel"&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;img src='folder1/screenshot.jpg' title=image1 /&gt;&lt;/li&gt;
    &lt;li&gt;&lt;img src='folder2/screenshot.jpg' title=image2 /&gt;&lt;/li&gt;
    &lt;li&gt;&lt;img src='folder3/screenshot.jpg' title=image3 /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>2) select list options are...</p>

<pre><code>&lt;select id="myThumbs"&gt;
    &lt;option&gt;image1&lt;/option&gt;
    &lt;option selected="selected"&gt;image2&lt;/option&gt;
    &lt;option&gt;image3&lt;/option&gt;
&lt;/select&gt;  
</code></pre>

<p>My existing code is below, which already binds the hover event to a preview div outside the carousel. I want to keep this behavior, and also add the click behavior to update the selected item in the options list so that it matches the title of the carousel image that was clicked.</p>

<pre><code>$(function() {
    $("#carousel").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
        visible: 6,
        mouseWheel: true,
            speed: 700
    });
$('#carousel').show();

$('#myThumbs').change(function() {
  var myImage = $('#myThumbs :selected').text();
 $('.selectedImage img').attr('src','../wp-content/themes/mytheme/styles/'+myImage+'/screenshot.jpg');
});

    $('#carousel ul li').click(function(e) {
    var myOption = $(this).children('img').attr('title');
    $('#myThumbs').addOption('Text', myOption);
    });

$('#carousel ul li').hover(function(e) {
  var img_src = $(this).children('img').attr('src');
    $('.selectedImage img').attr('src',img_src);  

}
,function() {
$('.selectedImage img').attr('src', '&lt;?php echo $selectedThumb; ?&gt;');});
});
</code></pre>
