Grow your CSS skills. Land your dream job.

Add row / autocomplete Problem

  • # January 13, 2010 at 1:52 pm

    Hi there.
    I ‘m making an invoice with the Editable Invoice who crhis make.

    now I add the autocomplete script, work fine with the first row, wich is written in the html,
    now with the addrow link, lose all functionality, no autocomplete and no autocalculate the total,

    please check it out, and post some ideas

    the link : http://www.cuboidea.com/invoice/index.p … ERNACIONAL

    I think is for the bind()
    try it to change to live, but "" .live(‘after’,function(){ "" is NOT correct, right, or could it be… ‘cos live work with event, click dblclick … not with after

    //code
    $("#addrow").live(‘click’,function(){

    // HERE $(".item-row:last").live(after, function(){(‘<tr ????????????????????

    $(".item-row:last").after(‘<tr class="item-row"><td class="item-name"><div class="delete-wpr"><a class="delete" href="javascript:;" title="Quitar Art&iacute;culo">Borrar</a><textarea id="articulo" class="articulo" onclick="this.focus();this.select()"></textarea></div></td><td class="description"><textarea class="description" onclick="this.focus();this.select()">Descripci&oacute;n</textarea></td><td class="valorunitario"><textarea class="cost" readonly="readonly">$0</textarea></td><td><textarea class="qty" onclick="this.focus();this.select()"></textarea></td><td><span class="price">$0</span></td></tr>’);
    if ($(".delete").length > 0) $(".delete").show();
    bind(); //HERE live() ???
    });

    bind(); // HERE live() ????

    $(".delete").live(‘click’,function(){
    $(this).parents(‘.item-row’).remove();
    update_total();
    if ($(".delete").length < 2) $(".delete").hide();
    });

    //code

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".