AJAX
Basics
Data
DOM
Effects
Events
Forms
jQuery UI
Plug Ins
Traversing
The prop()
method sets or returns properties and values of the selected elements.
When this method is used to return the property value, it returns the value of the FIRST matched element.
When this method is used to set property values, it sets one or more property/value pairs for the set of matched elements.
https://www.w3schools.com/jquery/html_prop.asp
$("#ReturnButton").click(function ()
{
$("#Results1").html(`the properties of class of header 1 are: ${$("#Demo1").prop("class")}. the attr of class is ${$("#Demo1").attr("class")}.`);
});
$("#SetButton").click(function ()
{
$("#Demo2").prop("class", "text-danger text-center");
});