Is there a way to rotate an html table?

Posted by Josh on Stack Overflow See other posts from Stack Overflow or by Josh
Published on 2010-05-02T19:59:09Z Indexed on 2010/05/02 20:08 UTC
Read the original article Hit count: 166

Filed under:
|

Is there a way to rotate an html table? So, say I had a table like this:

  <table id="table-1" cellspacing="0" cellpadding="2">
        <tr><td>1</td></tr>
        <tr><td>2</td></tr>
        <tr><td>3</td></tr>
        <tr><td>4</td></tr>
        <tr><td>5</td></tr>
        <tr><td>6</td></tr>
    </table>

and wanted to some sort of button that had javascript behind it that could rotate the table any which direction. For example, clicking the right button, results in:

  <table id="table-1" cellspacing="0" cellpadding="2">
        <tr><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td></tr>
    </table>

I have a drag and drop plugin that uses a table, and I am trying to do a piece that allows for a user to add to a queue (that results in the table), and then they can also rotate it around as well. Thanks.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about drag-and-drop