All right.
Welcome back.
So in this video we're going to talk about the CSI method.
So let's head over to HP docs a shortcut to learn advanced J.
Query right click to New Folder we're going to do 0 9 and we're going do CSI has method.
Okay so we're gonna close that I'll go to Sublime and I'm going to right click on the CSI method to
index on each Himmel to control and control us and demand jazz and I'm going to go to our setup J query
folder grab that first file paste that in here and then the main dat jazz file close that out and paste
it into the man that J asks we're going to right click and inspect
and you can see we're connected so we're going to go OK.
So the first thing I want to do is I'm going to talk to you about what we're gonna be doing with this
so we're going to talk about the the CSX method.
So the idea behind this is is the CSF the CSX method sets or returns one or more style properties for
selected elements.
So basically we can add multiple properties to an element so that's what we're going to do.
So we're going to write out the H email first here so we do an H two.
OK.
Here we go.
This is a in.
And then we're going to do the p tag with the style of background color
hashtag.
F F to absent and four zeros
and we type that again.
I don't know why it's not going to style.
Sorry about that.
And we're in the background color hashtag half of 0 0 0 0 not showing up correctly.
This is a paragraph.
So after that then we're gonna do the same thing again but we're gonna copy this and paste it below
two more times and we're just gonna change a color so we're going to do 0 0 5 0 0 and then the bottom
one here is gonna be 0 0 0 4 zeros into us.
OK.
Then below that we're gonna do the paragraph tag.
This is a paragraph
and then we'll do.
Button said multiple styles for P. K. safari click on open in the browser you can see we have red green
and blue.
Now when I go to the javascript file and delete the local council not log and I add in document not
ready with our function
open and close the brackets there.
We're gonna do a button and click event
function and inside of that we're gonna call the p tag for the dollar sign and then p tag and we're
gonna do dat class.
Sorry Dad see us us and then we're gonna do curly braces inside and then we're gonna do background.
So this is where we're right in the CSR background color yellow in quotes
I think obviously Oh I see she had to do background color and there we go.
The syntax is a little bit different with this because she has to do quotes for everything that way
it'll work.
And then we're gonna do font size so that'll be in quotes and then outside of that we're gonna do the
colon and we'll do 200 percent and then we'll close that at the end close this close that and we're
there.
So now I'm gonna open the index Foundation and I'll file on the browser and I'm going to set multiple
styles for P and now they're all yellow and the font size is 200 percent so that's a way that you can
dynamically change the CSX if you really needed to test something out and fairly quickly in a viewer
write in.
Let's say that you're writing in a javascript file and you want to overwrite what they had on the aged
and I'll page you you'll have access to this.
Yes that's file for whatever reason then you could overwrite it this way.
And J.
Query gives you a really easy way to do that which is the CSX method method.
So I highly recommend using that.
So thanks for watching.
I'll see you in the next video.