Hi all.

This piece of code runs in FF only once as expected, the click gets
called once, but it gets called multiple times in IE6, can someone
tell me what I am doing wrong? Its the second click below. Not the
livequery click

Thanks

// CODE

 $('#intended_branch_container .delete').livequery('click',
function(event) {
       if($(this).parent().attr("clone") == "0"){
        //alert("not deleteable");
       }
       else{
            $(this).parent().remove();

        };
    });

    $("#add_intended_branch").click(function(){
        if($('#intended_branch_container select').size()< maxValues){

            var suffix = rand(maxRndValue);

           $('#intended_branch_value').clone().attr('id',
'intended_branch_value' + suffix).attr('clone',
suffix).find('*').each(function() {
                    var ident = String(this.name);
                    changed= ident.substring(0 ,ident.lastIndexOf('-')
+1) + suffix;
                    $(this).removeAttr("id");
                    $(this).removeAttr("name");
                    this.name += changed;
                    this.id += changed;
                    $(this).attr("clone", changed);
            }).end().appendTo('#intended_branch_container');
             }
        else{
            alert("you cant add any more!");
        }// end else
    }); // end click

Reply via email to