Web Development with jQuery®

(Elliott) #1

Creating a Slideshow (^) ❘ 447
function()
{
this.id = 'slide-' + slideCollection + '-' + slideInCollection;
node.find('ul.slideshowControls')
.append(
$('

  • ')
    .attr(
    'id',
    'slideshowControl-' + slideCollection + '-' +
    slideInCollection
    )
    .html(
    $('').text(slideInCollection)
    )
    );
    slideInCollection++;
    }
    );
    node.find('ul.slideshowControls li:first')
    .addClass('slideshowControlActive');
    node.find('ul.slideshowControls li')
    .hover(
    function()
    {
    $(this).addClass('slideshowControlOn');
    },
    function()
    {
    $(this).removeClass('slideshowControlOn');
    }
    )
    .click(
    function()
    {
    if (!slideshows[slideCollection].transitioning)
    {
    if (slideshows[slideCollection].resumeTimer)
    {
    clearTimeout(slideshows[slideCollection].resumeTimer);
    }
    slideshows[slideCollection].transitioning = true;
    slideshows[slideCollection].isInterrupted = true;
    var li = $(this);
    node.find('ul.slideshowControls li')
    .removeClass('slideshowControlActive');
    node.find('.slide:visible')
    http://www.it-ebooks.info

  • Free download pdf