Bug Tracker

Changeset 1893

Show
Ignore:
Timestamp:
05/13/07 05:53:49 (2 years ago)
Author:
brandon.aaron
Message:

Fix for #1162

Location:
trunk/jquery/src/jquery
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/jquery/coreTest.js

    r1892 r1893  
    360360 
    361361test("append(String|Element|Array<Element>|jQuery)", function() { 
    362     expect(16); 
     362    expect(17); 
    363363    var defaultText = 'Try them out:' 
    364364    var result = $('#first').append('<b>buga</b>'); 
     
    421421    $('#table colgroup').append('<col>'); 
    422422    ok( $('#table colgroup col').length, "Append col" ); 
     423     
     424    reset(); 
     425    $('form:last') 
     426        .append('<select id="appendSelect1"></select>') 
     427        .append('<select id="appendSelect2"><option>Test</option></select>'); 
     428     
     429    t( "Append Select", "#appendSelect1, #appendSelect2", ["appendSelect1", "appendSelect2"] ); 
    423430}); 
    424431 
     
    474481 
    475482test("prependTo(String|Element|Array&lt;Element&gt;|jQuery)", function() { 
    476     expect(5); 
     483    expect(6); 
    477484    var defaultText = 'Try them out:' 
    478485    $('<b>buga</b>').prependTo('#first'); 
     
    494501    $("#yahoo, #first").prependTo('#sap'); 
    495502    ok( expected == $('#sap').text(), "Check for prepending of jQuery object" ); 
     503     
     504    reset(); 
     505    $('<select id="prependSelect1"></select>').prependTo('form:last'); 
     506    $('<select id="prependSelect2"><option>Test</option></select>').prependTo('form:last'); 
     507     
     508    t( "Prepend Select", "#prependSelect1, #prependSelect2", ["prependSelect1", "prependSelect2"] ); 
    496509}); 
    497510 
  • trunk/jquery/src/jquery/jquery.js

    r1892 r1893  
    15241524                return; 
    15251525 
    1526             if ( arg[0] == undefined || jQuery(arg).is("form, select") ) 
     1526            if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options ) 
    15271527                r.push( arg ); 
    15281528            else