Loading ...
Sorry, an error occurred while loading the content.

TabView and Carousel Event Handling

Expand Messages
  • UZ
    Hi, I m trying to attach a function to an event which would display the targeted carousel member in a tab but since I m a real noob to js I don t know how to
    Message 1 of 1 , Nov 27, 2009
    • 0 Attachment
      Hi,

      I'm trying to attach a function to an event which would display the targeted carousel member in a tab but since I'm a real noob to js I don't know how to create the function. Here's the layout where the event should be applied:

      http://www.szatanik.eu/js/yui_2.6.0/examples/uz/event_handling_1.html

      So when you click on a element in the upper carousel the main carousel wrapped in the tab below should switch to a specific spot. The idea behind it is to give you a preview with the upper, small carousel and then direct you to a more detailed element in the bigger carousel...

      I think it should start somewhat like this:

      <script>

      (function() {

      //A function that activates the desired tab and drives the main carousel to the right spor, e.g. clicking pic_c goes to tab/approaches/approaches_pic_2:

      var displaySpot = function(e) {
      //and now I'm pretty helpless:) about the function that should be executed when the element is clicked on
      }

      //subscribe the displaySpot function as an event handler for the click event on element pic_c

      YAHOO.util.Event.addListener("pic_c", "click", displaySpot);

      It would be great if someone could give me a little lesson or direct me to an example that deals with something similar.

      Cheers, Klaudiusz

      P.S. I'm also a little bit confused about where to post my problem: ydn-javscript group or the yuilibrary.com/forum so I put it in both places. I thought in future everything will be moved to the forum ?
    Your message has been successfully submitted and would be delivered to recipients shortly.