Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Senior Member shoffman3572's Avatar
    Join Date
    Jul 2008
    Location
    Fullerton, CA
    Posts
    137
    Member #
    16990
    I'm trying to build a double accordian - left right up down etc..

    here's the code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="XHTML namespace">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>grid design experiment</title>
    <script src="http://ajax.googleapis.com/ajax/libs.../jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    function expand(row, col)
    {
    for (i=1; i<4; i++)
    {
    if (row==i){
    $("#row"+row+"").animate({
    height: "404px"
    })
    }
    else
    {
    $("#row"+i+"").animate({
    height: "101px"
    })
    }
    }
    for (i=1; i<4; i++)
    {
    if (col==i){
    $("#c"+col+"").animate({
    width: "404px"
    })
    }
    else
    {
    $("#c"+i+"").animate({
    width: "101px"
    })
    }
    }
    }
    </script>
    </head>
    <body style="background-color:#000;">
    <div id="mainWindow" style="margin:100px auto; width:606px; height:606px; border:1px solid #ccc; background-color:#fff;">
    <table width="606" height="606" border="0" cellspacing="0" cellpadding="0" style="height:606px; width:606px;">
    <tr id="row1" >
    <td id="c1" style="background-color:#FCF;"><a href="javascript:expand(1,1)">c1r1</a></td>
    <td id="c2" style="background-color:#FCC;"><a href="javascript:expand(1,2)">c1r1</a></td>
    <td id="c3" style="background-color:#FC9;"><a href="javascript:expand(1,3)">c1r1</a></td>
    </tr>
    <tr id="row2" >
    <td id="c1" style="background-color:#FC6;"><a href="javascript:expand(2,1)">c1r1</a></td>
    <td id="c2" style="background-color:#FC3;"><a href="javascript:expand(2,2)">c1r1</a></td>
    <td id="c3" style="background-color:#FC0;"><a href="javascript:expand(2,3)">c1r1</a></td>
    </tr>
    <tr id="row3" >
    <td id="c1" style="background-color:#F60;"><a href="javascript:expand(3,1)">c1r1</a></td>
    <td id="c2" style="background-color:#F63;"><a href="javascript:expand(3,2)">c1r1</a></td>
    <td id="c3" style="background-color:#F66;"><a href="javascript:expand(3,3)">c1r1</a></td>
    </tr>
    </table>
    </div>
    </body>
    </html>

    Strangly this works exactly the way I was hoping - in IE 8.0 ! But just acts weird in Chrome, Safari anf FF..

    Goign to keep working on this.. but any suggestions would be nice!

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:50 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com