I have some code which clones a HTML Select element. The cloning works fine.
The cloned elements will have an id={original_element_id}-1
After the element is cloned, in IE7 I am unable to select the element. For example:
Original element:
<select name="13">
<option>Value 1
<option>Value 2
</select>
Cloned Element:
<select name="13-1">
<option>Value 1
<option>Value 2
</select>
I try this:
$("[name='13-1']").live('click',function() {
alert(1);
});
This works in Chrome, but in IE7 it doesnt work.
How do I select the dynamically created element in IE7 ?
I am using Jquery 1.4.2, I have tried 1.4.3, 1.4.1, 1.4.0, 1.6.2
I have tested my version IE7 and working fine, change your script to the following:
Link : http://jsfiddle.net/LE9Ed/
UPDATE
Dynamic html : http://jsfiddle.net/LE9Ed/1/