Total Page Preview:   000000000248

What is jQuery CSS()?

jQuery CSS()

jQuery is a fast and lightweight JavaScript library that simplifies HTML document traversal and manipulation, as well as event handling and animation. While jQuery itself doesn't have a specific CSS functionality, it provides methods to manipulate CSS properties of HTML elements.
Here's an example of using jQuery to manipulate CSS properties:
In this example:
  1. The HTML document includes a div element with the class example-div.
  2. The <style> tag contains some initial styles for the .example-div.
  3. The jQuery library is included from the official CDN.
  4. In the <script> tag, jQuery is used to select the .example-div element and modify its CSS properties.
  • Example 1 changes the background color to light green.
  • Example 2 adds a border with dark blue color.
  • Example 3 changes the width of the div to 300 pixels.
  • Chaining is also demonstrated in the last example.
Make sure you have an internet connection to load the jQuery library from the CDN in this example. You can also download the jQuery library and host it locally if needed.
 
 
 
 
 

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



Comments