JSFiddle

  • Change selected radio #9 is the latest revision

    jQuery 1.8.3, HTML, CSS, JavaScript

    $(document).ready(function(){
        
        $("button").click(function(){
        
        $("input[value='D']").attr("checked","checked");
        });
        
        console.log( $("input[value='tt']")        );
        console.log( $("input ...
  • Punch all little siblings

    jQuery 1.8.3, HTML, CSS, JavaScript

    $(".firstborn").nextAll().each(function(){
        //alert("a little sibling!");
        $(this).addClass("punched");   
        
    });
  • does .closest() check itself first?

    jQuery 1.8.3, HTML, CSS, JavaScript

    $(".baby").on("click", function(){
        $(this).closest("div").addClass("bright");   
        
    });
  • PaperForm: Form inputs resembling paper forms

    jQuery 1.8.3, HTML, CSS, JavaScript

    <div class="field">
        <label class="label">Phone Number</label>
        <input type="text" placeholder="(555) 555-5555">
    </div>
    
    <div class="field drop">
        <div class="label">Choose One:</div>
        <select><option>One</option>
            <option>Two</option>
            <option>Three</option>
        </select>
    </div>
    
    <div class="field drop print">
        <div class="label">Choose One:</div>
        <select><option>One</option>
            <option>Two</option>
            <option>Three</option>
        </select>
    </div>