Welcome back.
So in this video we're and talk about the removed class method so let's jump in to our HD docs folder.
Let's go to learn advance to a query right click to New Folder 0 7.
And we're going to remove class.
Class method.
Ok.
Cause that out us the bottom right click to new file.
We're going to index that age to.
I'm going to do control and control us.
We're going to demand J S and I'm going to go to the set up J query folder.
Click on the index that h to I'll file right click and copy cause I went out pasted in here save that
kind of Amanda J ust do the same thing
and I'll paste it here and when I right click and open the browser to inspect this you're going to see
that it's connected right there.
So that means that our JavaScript files are connected with the HDMI file.
Someone delete that and what I want to do now is we're going to write out a little HDMI and then a little
C Ss so that we can remove a class.
So we're gonna do H1 class blue.
It's gonna be heading one that we're gonna do H two class blue.
We'll be heading to
that we'll do the paragraph tag class blue.
This is a paragraph
OK we'll close up and then we'll do the p tag.
This is another paragraph
and then below that we're going to add a button so remove class from elements.
So now what we're gonna do is we're gonna style this so as to style
and we're going to do the class of not important.
And we're going to do font weight bold font size extra extra large K and then we'll do the class of
blue and the color is gonna be blue.
Now when I go to the J query and we do the reading to document that ready with the function and we're
going to the curly brace here and we'll do the dollar sign we're going to call on the button we're going
to click event.
So we'll do our click function and we'll do each one
H to H.
Nothing but P P..
And then we're gonna do dot remove class and we're going to remove blue.
OK.
So when I close that and I close this one and I close that one and we save this and we write click and
open the browser what it's gonna do is right now everything is blue right.
Of I remove the class it takes blue away now I flipped.
Let's inspect this real quick because what this is doing is right now we're calling on the
class of blue
come and refresh us.
There we go.
So you have the heading has a color blue the paragraph doesn't have anything on the button does everything
but these all have blue on them right.
So the two H1 H2 and the p p tag and paragraph tag all have blue as a class and as a property but as
soon as I remove it it's gone because what we're doing is we're using the remove class method so that
removes any CFS class actually in the H Jamal class that you call and you can use this across the board
on a website if you really wanted to where you could kind of go in between the two different styles.
You can toggle now toggle method the toggle class method actually is what we're gonna be talking about
next.
So I don't want to spoil the fun there.
So I'll see you in the next video we're going we're going to talk about the toggle class method.
I'll see you there.