Welcome back.
So in this video here to talk about the set content method.
So let's head over to our HIV Doc shortcut.
Go to learn advance J.
Query and we're going to right click do New Folder 0 3 set content method.
And while we're here we're going to edit this one the one above and I'm going to get rid of the little
brackets here to clean it up a little bit.
There we go.
Close that out I mean go to sublime now and I'm gonna go to the set up J query file here and the indexed
on each to moment control a control C and I'm gonna make a new file here index that H Timo and paste
that in and then I'm gonna grab the council that log from the main digest and we'll make a new file
here so demand Ijaz and we'll paste that in we'll close out that one and we can minimize that and I'll
right click open in the browser just to make sure we're connected and we are excellent.
So now what we're gonna do is I'm a close that out and we're gonna build the SEC contact method.
So the SEC contact method is similar to the get content method.
It uses the same methods the text method the H HTML method and the value method.
So what we're gonna be talking about in this video is the callback function for the text method.
The H Timo method and the value method to add to what we learned in the previous video.
So with that let me go to the example here and see here.
OK.
So what we're gonna do inside the body we're gonna go and type in the paragraph tag I.D. We're going
to do test 1.
This is a bold
paragraph.
And we'll close that then I'm going to do a paragraph I.D. test to this is another do the bold diagram
bold paragraph and we'll close that p tag below that we're gonna do button and we're gonna give an idea
of between one show old new text then below that we're gonna do button two so I.D. B10 to show bold
new text.
OK now we're gonna go and do the fun part.
So we're gonna go to the main digest we're going to delete the council that log here say that and we'll
do document
ready give me a function and we're going to put a curly brace on there and we're gonna write in dollar
sign we're gonna call the I.D. of hashtags or I.D. button between one and we want to on the click we're
gonna write a function and we're gonna do
dollar sign and we're gonna call the test I.D. So test one and that's gonna be that text
function and inside of there I'm going to do I comma original text so i o r IRG text.
OK.
So that's short for that.
And then inside of there we're gonna return old text.
So we're gonna do plus original text plus
space new text J.
Query rocks OK.
And then inside of there also we're gonna do index
column and then we're gonna do plus I plus quotes and then close that and close that.
And that should give us what we're looking for here.
So we're going to close this right here these brackets and below the brackets.
I want to do another thing.
So we're going to add for the second test to that we built here.
So this what we built here right here is for the first button.
So this button right here.
OK.
And so this right here let's test this out.
Let's open the browser.
Show old text.
OK.
So new text jiggery rocks.
There you go.
Some are refresh that.
So this is bold.
This is a bold paragraph.
So if I click that old taxes this is a bold paragraph.
New taxes Jake or.
So we basically told that look I want you to return the old text and the new text.
So there you go.
So we're going to do the same now for this one right here and it's the same idea.
So what we're gonna do is let's copy this OK and we're going to paste it right below.
And it's gonna be beat and to test too and everything else is gonna stay the same.
The only thing that we're gonna change is it's sort of old tax it's going to be old age dismal and where
they still do original text new text or New Age to Mel hey we'll be
let's do the strong text.
So we'll do all caps.
All right
then we'll close that.
OK.
Now let's go to the next one each to my file right click open in the browser.
And when we click this this is another bold paragraph New Age out is the strong tag with text and this
one.
This is a bold paragraph new taxes Jake or rocks.
So when you click that it's going to keep displaying it.
So that is the set contact method.
OK.
So thanks for watching.
I'll see in the next video.