Results 1 to 2 of 2

Thread: Invoking a click event

  1. #1
    Join Date
    May 2009

    Exclamation Invoking a click event

    Hi all,

    Just so you know, I'm not very competent in JavaScript. With that being said, I have a slideshow module that displays the main image as well as the thumbnails on the side. It automatically cycles through the main image but the thumbnails don't scroll with it. I'd like it to. I found the code that adds the "click" event to the arrow to make the thumbnails scroll and I found the code that is run every time the main image is changed. Is there a way to just stick a line of code in there that will invoke the click event?

    Here's the code that adds the click event to the button...
    $E('.gk_ni_6_tabsbar_down', mainwrap).addEvent("click",function(){				
         if((scrollValue < (scrollableAreaH-scrollAreaH))) { scroller_down.scrollTo(0, scrollValue+$offset); }
    I was thinking I could just stick something like this in for every time the picture changes but no such luck:
    document.getElementById($E('.gk_ni_6_tabsbar_down', mainwrap)).click();
    Am I even on the right track? Is this doable?

  2. #2
    Join Date
    Apr 2003
    Applied to onblur, but the principle is the same: http://www.webdeveloper.com/forum/sh...d.php?t=209423
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center