In this tutorial, We will learn how to jquery set attribute values. We set attribute value using jquery use attr() method. 


<!DOCTYPE html>
        <title>Jquery Set Attribute Value</title>
    <style type="text/css">
        <h1>Some test</h1>
        <button>Set Attribute</button>
        <script src=""></script>
            $(document).ready(function () {
                $("h1").attr("class", "design");

                 //set element attribute 
                $("button").attr("disabled", "disabled");

Thanks, May this example will help you.

Are you facing problems in understanding this article?
You can watch the video. Watch it now