0% found this document useful (0 votes)
10 views

Module 11 Manipulating CSS Using Jquery

Mobile App and Web Development
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Module 11 Manipulating CSS Using Jquery

Mobile App and Web Development
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Manipulating CSS Using jQuery

Starting off with the first topic, Adding and Removing Classes.

A. The add Class Method


this jQuery method adds one or more classes to the selected elements. Multiple classes
can be specified by separating each class to be added by simply using whitespace.
B. The remove Class Method
This class Removes one or more class names from selected elements. Like the add Class
method, multiple classes can also be removed by separating them
using spaces.
C. The toggle Class Method

A method that toggles between adding or removing classes from the selected elements.
If the specified class exists for the element, it is removed, and if it does not exist, it is
added.

Knowing those three methods, lets proceed to the CSS properties.

(next slide, DO NOT READ THIS)

CSS Properties, the css method.

The css method is a jQuery method that can be used to get and set a CSS class property value
which Works similarly to the html method.

As for multiple properties, it can be set using the css method along with JSON syntax for
property-value pairs. Property-value pairs are enclosed in curly braces and separated with
commas.

(next slide, DO NOT READ THIS)

As for the last topic of this report, Dimensions.

Dimensions Can be set using a particular group of methods for HTML elements which are the
width and height method, the inner width and inner height method, and the outer width and outer
height method.

The width() and height() methods are used to set element width and height WITHOUT padding,
borders, or margins. While he innerWidth() and innerHeight() methods are used to set element height
including ONLY padding. As for The outerWidth() and outerHeight() methods, it includes the padding
and borders.

Its important to note that Values are static; numerical values are converted to their equivalent
length or width in pixels. With that said, this will be the end of our report, thank you for listening.

You might also like