Results 1 to 2 of 2

Thread: Switch content from <tr> in Switch Content II

  1. #1
    Join Date
    Apr 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch content from <tr> in Switch Content II

    Hi!

    I just started playing around with the Switch Content II script...and i was wondering if anyone have managed to make it work by clicking anywhere in the <tr> instead of just the + or - sign.
    Currently i've only managed to make it switch without the + and - signs changing.....(well they do change, but opposite of what they are intended to do):

    Code:
    <tr class="padd" onClick="expandcontent(this,'sc1')" style="cursor:hand; cursor:pointer">
    I guess the 'this' would be wrong here?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Using a table row with this script is highly unreliable, especially in IE. Much better to use a table cell. If you want it to be a table row, use a row with one cell. If you want cells within that row, nest another table in the single celled row's cell.

    This is also true of the expanding content (sc1, sc2, etc.). Use cells or divisions in cells. The table row is a special case and generally should never have any content other than a cell(s).
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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