After reading (the interesting) .prop() vs .attr() and jQuery Performance : attributes doubt arise in my mind about what is better to use: .prop() or .val() ? I want to set
One more bug when using prop(). Under IE 11, the following code wouldn't set the value:
prop()
var props = {'value':'test', 'type':'radio'}; var input = $('').prop(props); $(document.body).append(input);