How to remove the selected element during a clone() operation

Posted by Slinky on Stack Overflow See other posts from Stack Overflow or by Slinky
Published on 2010-05-21T13:32:38Z Indexed on 2010/05/21 13:40 UTC
Read the original article Hit count: 218

Filed under:
|
|
|
|

Hi All,

I have a select box that gets cloned. I want to remove the user's previous selection from each cloned select box. Here is the method that does the clone() :

function addselect(s){
 $('#product_categories > .category_block:last').after(
    $('#product_categories > .category_block:last').clone()
  ); set_add_delete_links(); return false;
}

What's the best way to do this?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about clone