set attributes on in memory html snippet dont work

set attributes on in memory html snippet dont work

Firebug, FF 3.6.6, ubuntu/windows

Is it not possible to alter attributes of virtual / in memory html snippets BEFORE they are inserted into the DOM???

try this in firebug console:

  1. var html = '<tr> <td> <input class=" text" id="invoice_line_items_attributes_14_name" maxlength="50" name="invoice[line_items_attributes][14][name]" size="25" type="text" value=""></td> </tr>';

    console.log( $("input[id$='_name']", html ) );

    //none of those works
    $("input[id$='_name']", html ).val('not beeing set');
    $("input[id$='_name']", html ).attr('value','not beeing set');
    $("input[id$='_name']", html ).attr({'value':'not beeing set'});

    console.log( $("input[id$='_name']", html ).val() );









The element is found, but there is no chance to update its attributes. I dont know if this is a jQuery bug or if the browser does not allow it.
Does somebody has a hint on it??