how to change the parameter of the clone event

After clone the dropdown, I can change the id and name. However, the parameter value of the function is still using the original value. I searched the web and found the code at Learn to Attach Event Handler with jQuery .change() Method. I may misunderstanding it, so it didn't change. Would you help me.

The original element: onchange='handleDrop('drp_0');

The clone element should be like that onchange='handleDrop('drp_1');

There is my code:

      var drop = firstRowClone.find('td:eq(1)').find('select');
      drop.attr('id', dropID);
      drop.attr('name', dropID);                       
      drop.change(dropID, 'handleDrop');


from Recent Questions - Stack Overflow https://ift.tt/35Cz0yn
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)