Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Id to child selector in javascript

    Hi to all! I am new here and I don't know anything about javasript language, so I need little help. I want to use some javascript image effects (Demo here
    After I link javasript files to my html template page, I have to options to achive effects(Link):

    1.
    Code:
    <script type="text/javascript" language="javascript">
        // <![CDATA[
          Effect.Appear('element_id');
        // ]]>
        </script>
    2.
    Code:
    <div onclick="new Effect.SwitchOff(this)">
          Click here if you've seen enough.
        </div>
    Since my content is generated trough php and I want to apply effects to more images, not only one only way to do it is to apply effect to some child selectors, for example
    Code:
    div.content a img
    How should javascript look like to make this possible? I would really appriciate your help.

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    to apply effect to some child selectors, for example
    Which migh be the structure? Is something like?:

    <div id="container">
    <img src="">
    <img src="">
    <img src="">
    <img src="">
    </div>

    or ?

    <div id="container">
    <div>blah</div>
    <div>blah</div>
    <div>blah</div>
    <div>blah</div>
    </div>

    It is important to know how you elements are grouped. If there is no way to be grouped, which is their common something? Class, style, some other attribute.?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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