Total Page Preview: 000000000310
What is jQuery prop()?
jQuery prop()
In jQuery, the prop() method is used to get or set properties of elements. It can be used to get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
Here's a small example to demonstrate the use of prop():
In this example, when the page loads, the prop() method is used to set the 'checked' property of the checkbox to true. Then, the prop() method is used again to retrieve the value of the 'checked' property, and the result is logged to the console. In this case, it will log that the checkbox is checked. You can modify the example to experiment with other properties and values.
Thank You
About Author
Brijesh Kumar
Database Developer
I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL
Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall
and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com