Monday, September 11th, 2006

Introducing : Alternating Rows

By Chris LoSacco

The Arc90 lab just got its fifth tool, Alternating Rows, a great script that takes plain table data and makes it much more readable. Just feed your table tag a couple of colors and let the tool do the rest.

19 Responses

  1. Mark said:

    The Mutiselect page (http://lab.arc90.com/2007/07/02/multiselect/) contains the following line:

    “Add a link to the javascript file in the page(s) you’d like alternating rows implemented”

    Is there a mix up in the instructions with alternating rows?

  2. Jacob said:

    Hello,

    The tool is beautiful, but I can’t seem to make it work handling the onChange and onBlur events…

    Do you happen to have any samples…

    Thank you very much,

    Jacob

  3. brugo said:

    Hi all, can someone help me? how to get the values of the selected checks?? im trying it, but cant.

    ty

  4. Leonard said:

    Hello,

    Is it possible to have the multiselect work without a form select element?
    I would like to gererate the div’s from at server so i don’t need to put a select-element on the client first. This would also mean that during onload the div-elements don’t need to be created, which would be faster.
    Another important fact is:
    When using a backbutton (after sending a form post) in the browser always the last position of a select is kept on the option of the previous page. When eliminating the select, this problem will be eliminated.

    thanks

    Leon

  5. John said:

    Is there a way with this tool to limit how many options the user selects? So maybe they could only select 3 options?

  6. Brock said:

    Sorry if this is the wrong place, but I arrived on this page from the feedback link on the jQuery Multiselect page. There are a few bugs I’d like to report in jQuery multiselect.

    1) line 450 in updateSelectTitle: when trying to calculate the number of selected items, the selector has a typo for the “select all” CSS class. It has selectall when it should be a9selectall.

    2) line 134, 135 and 136: These 3 globals cause problems when you use more than one instance on the page. Move them into the “this.each” loop that starts on line 165.

    3) line 174 in multiSelect_closeWindow: The callback function “multiSelect_closeWindow” is causing a stack overflow in IE8 (didn’t test other versions) due to an infinite loop. Inside the method it invokes “selectTitle.click( )” which is causing recursion. I’d suggest changing the “selectTitle.click( )” to “selectTitle.triggerHandler(“click”).

    Otherwise, nice widget! :)

  7. Nico said:

    This component contains errors; if you select and unselect diferents checks, the value that submited is not valid.

  8. Roatin Marth said:

    Is multi-select *supposed* to work with IE6? It doesn’t for me.

    The instructions at http://lab.arc90.com/2007/07/02/multiselect/ state “Currently, the alternating rows script has been tested and confirmed on the following browsers: Internet Explorer 6.0 …”

    Why does it say “the alternating rows script”?

  9. desidude said:

    How is this any different from the bit.ly sidebar ?

  10. Alex said:

    Hi:

    I’ve found a problem with this amazing library. In your examples and download you use jQuery 1.2.1.

    I’ve tested with 1.2.3 and 1.2.6 and it works. But if you use any of the new jQuery 1.3.* there’s a small problem. The click out of the layers of checkboxes that calls to “multiSelect_closeWindow” function, does not work. It does not close the layers. You can just close it clicking in the select field, but no out of the boxes.

    Do you think you can fix this ? :)

    Thank you very much in advance !

  11. Alex said:

    By the way, the error of the browser when you click out of the select is:

    Error: too much recursion
    Archivo de origen: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
    Línea: 19

    (I use Google CDN Libraries, but with local jquery libs the error is the same)

  12. Alex said:

    I don’t like this patch but at least solves the problem:

    function multiSelect_closeWindow( )
    {
    select_state = ( select_state )? false : true;
    selectContent.toggleClass(‘collapsed’);
    //selectTitle.click( );
    $(‘body’).unbind(“click”, multiSelect_closeWindow);
    }

    Simply use the “click function” lines inside the multiSelect_closeWindow function.

    Until a solution is given, at least, works ! :)

  13. kokwai said:

    For the stack overflow bug, removing the below line works

    jQuery(‘body’).bind(“click”, multiSelect_closeWindow);

    But then the multiselect needs to be closed by clicking on the arrow, not by clicking outside the component.

  14. RememberME said:

    The proper blog for the MultiSelect is here:

    http://blog.arc90.com/2007/11/28/introducing-jquery-multiselect/

  15. Alejandro said:

    question?
    es posible agregar un scrollbar cuando son muchos campos, perdón por mi ingles

  16. Alejandro said:

    sorry :P
    you can add a scrollbar when there are many fields, sorry for my English

  17. Heiko Henning said:

    I have made an bugfix based on v1.1

    row 231:

    /* When the user clicks the select box title, display the contents. */
    selectTitle.click(function()
    {
    select_state = ( select_state )? false : true;
    selectContent.toggleClass(‘collapsed’);

    if (select_state==false)
    $(‘body’).unbind(“click”, multiSelect_closeWindow);
    });

    row: 174
    function multiSelect_closeWindow( )
    {
    selectTitle.click( );
    //(‘body’).unbind(“click”, multiSelect_closeWindow);
    }

  18. olca said:

    Hi, can someone help me? how to get the values of the selected checks?? im trying it, but cant

    thanx

  19. sam said:

    Hi! I love your bookmarklet, keep up the good work!
    But lately I’ve been trying to use TBUZZ and discovered that, after logging me into my Twitter account, the pop-up window didn’t recognize that I am logged in. It still says: “Log in to your Twitter account…”, but I am logged in. I use Firefox on Win Vista, and the problem wasn’t there when I first used TBUZZ. Can you please help me?

Leave a Comment