I am using this code to replace a value inside a td cell and to pop up a select input.
$(document).one('click',"#editlanguageinline", function (e) {
$(this).html('<select><option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option></select>');
});
I would like to create an inline edit for this table row/cell. So the user should be able to select a value for every new row in this column and after selecting it, a ajax event calls the php file where the new value is updated. But if I want to choose a new value in the dropdown menu, the css event is activated again. So the replacement event is fired again and I can not choose a value. How can I avoid this? I tried the command .one() but than all other rows do not really activate the event because than it is really only activated once. It should be deactivated for the cell that I currently clicked so I can choose a value.
thank you in advance for any help.