Jquery add / remove attribute

Add Attribute –
$(‘#id’).attr(‘attribute name’,’attribute value’);
$(‘.class’).attr(‘attribute name’,’attribute value’);
Like $(‘#id’).attr(‘multiple’,’multiple’);

Remove Attribute –
$(‘#id’).removeAttr(‘attribute name’);
$(‘.class’).removeAttr(‘attribute name’);

Leave a Reply

Your email address will not be published. Required fields are marked *