JavaScript
  Home arrow JavaScript arrow Page 3 - A Look at the New YUI Carousel Control
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
JAVASCRIPT

A Look at the New YUI Carousel Control
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 6
    2009-04-13


    Table of Contents:
  • A Look at the New YUI Carousel Control
  • Enhancing the Page
  • Additional Configuration
  • Working with Carousel’s Custom Events

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    A Look at the New YUI Carousel Control - Additional Configuration
    ( Page 3 of 4 )

    The carousel currently has few configurable properties due to its beta status, but don’t worry, this is sure to change as the component grows. Let’s put some of the available properties to use in this next stage in the example; change the carousel constructor method in our final <script> element in carousel2.html so that it appears as follows (new code is shown in bold): 

    var carousel = new YAHOO.widget.Carousel("scientists", {

    animation: { speed: 0.5 },

    isCircular: true

    });

    We also need to link to another library resource for this example, the animation utility, to add animation to the carousel; add the following <script> element directly before the carousel’s source file: 

    <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/animation/animation-min.js"></script>

    Save the changes as carousel3.html . We used two properties in this example, the animation and isCircular properties. The animation property, which takes a literal object containing the animation parameters, enables the smooth animation of page changes in the carousel. Click on one of the buttons to see the animation in action. 

    The second property enables circular behavior in the control, where instead of just ending on the final page, the component switches back to the first page automatically. Again, just run the page and check it out. 



     
     
    >>> More JavaScript Articles          >>> More By Dan Wellman
     

       

    JAVASCRIPT ARTICLES

    - Introduction to JavaScript
    - Adding Elements to a Tree with TreeView jQue...
    - Using the Persist Argument in a TreeView jQu...
    - Using Unique and Toggle in a TreeView jQuery...
    - Using Event Delegation for Mouseover Events ...
    - Using the Animate Option in a Treeview jQuer...
    - Using HTML Lists with Event Delegation in Ja...
    - Opened and Closed Branches on a TreeView jQu...
    - Mouseover Events and Event Delegation in Jav...
    - Creating a TreeView JQuery Hierarchical Navi...
    - Event Delegation in JavaScript
    - A Look at the New YUI Carousel Control
    - Working with Draggable Elements and Transpar...
    - Displaying Pinned Handles with Resizable Con...
    - Building Resizable Containers with the Ext J...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek