All elements in div instead of #Some_Id

Discussion in 'JavaScript' started by balkanboy, Dec 8, 2005.

  1. #1
    I want to use some javascripts (Demo)
    There are to ways to make this script work:
    1 .
    <script type="text/javascript" language="javascript">
        // <![CDATA[
          Effect.Appear('element_id');
        // ]]>
        </script>
    Code (markup):
    2.
    <div onclick="new Effect.SwitchOff(this)">
          Click here if you've seen enough.
        </div>
    Code (markup):
    I want to make effects work on all images inside specific div. I need #elemnt_id to be replaced with something like div.content a img
    How can this be done?
     
    balkanboy, Dec 8, 2005 IP
  2. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I apologize for this, but I don't understand what you're asking.

    And I'm really tired, and I've been bouncing around programming languages the past few days, so I'm going to disclaim my guess as pseudocode.

    Are you looking for something along these lines?

    foreach(element in getElementByName("the_div")) {
       if(isImg(element) or isLink(element)) {
          Effect.Appear(element);
       }
    }
    Code (markup):
     
    jimrthy, Dec 9, 2005 IP