RSS Feed

Posts Tagged ‘javascript’

  1. Today I learned…

    January 30, 2012 by pfranzen

    document.height does not work in the new Firefox (9) :-(


  2. Simple, JQuery select all check box

    June 9, 2009 by pfranzen

    Seriously, this is a snippet that should be out there, jeez:


    function selectAllChecks(){
    if( $(this).attr('checked') == true ){
    $(':checkbox:not(this)').attr('checked', true);
    }
    else{
    $(':checkbox:not(this)').attr('checked', false);
    }
    }

    $(document).ready(function(){
    $(‘input#selectAll’).bind(“click”,selectAllChecks);
    }); //end document.ready function

    Obviously, you want your select all checkbox to have an id of “selectAll”