Hi,
.attr() will not change the 'checked' property the way it used to, at least not consistently among browsers and platforms. Instead now .prop() must be used:
http://api.jquery.com/prop/
You are using .attr() to change the 'checked' property on line 141:
if ( typeInput == "radio" || typeInput == "checkbox" ) copiedInput.attr( "checked", $(this).is(":checked") );
should now be:
if ( typeInput == "radio" || typeInput == "checkbox" ) copiedInput.prop( "checked", $(this).is(":checked") );
The same issue stands for 'selected' on line 145:
if ( $(this).is(":selected") ) $("option", copiedInput).eq( i ).attr( "selected", true );
should now be:
if ( $(this).is(":selected") ) $("option", copiedInput).eq( i ).prop( "selected", true );
To my knowledge, the other uses of .attr() in your code are ok.
Hi,
.attr() will not change the 'checked' property the way it used to, at least not consistently among browsers and platforms. Instead now .prop() must be used:
http://api.jquery.com/prop/
You are using .attr() to change the 'checked' property on line 141:
if ( typeInput == "radio" || typeInput == "checkbox" ) copiedInput.attr( "checked", $(this).is(":checked") );should now be:
if ( typeInput == "radio" || typeInput == "checkbox" ) copiedInput.prop( "checked", $(this).is(":checked") );The same issue stands for 'selected' on line 145:
if ( $(this).is(":selected") ) $("option", copiedInput).eq( i ).attr( "selected", true );should now be:
if ( $(this).is(":selected") ) $("option", copiedInput).eq( i ).prop( "selected", true );To my knowledge, the other uses of .attr() in your code are ok.