So something else that we can do with Jake Query and Javascript basically as itself is do something
call the events events are anything that you do with a degree you can interact with a browser.
This could be as you mouse over a button it changes as you mouse if you click it it does something which
is as you move your cursor over things to different acts like that are bats or things that happen within
the browser window.
So what to do is create some of those events using a query.
So I use my last documentary I want to rename it here and to call the events save at the same location
here and get rid of a bunch of these old commands through quick and still using the javascript.
They're still using the first document ready function up here to get rid of the rest of the stuff in
between here.
Now I am going to ask you this text box area down here but instead of using Jake queery to stylize it
I'm going to create just a little bit of basic CSSA here.
And to target that idea just wrote where it can to say a text box to open and close that sucker.
And when I say with say Turner 50 pixels maybe and give it a try.
So when a group button here basically is what I'm doing.
So height.
Close to 50.
You know I think this make it even smaller.
Here is ticking down a little bit because it's a button it's not a big honkin area there and then maybe
just give it a border one pixel solid black and maybe give the background color of ELAS blue shirt or
whatever.
OK.
So we got that styled down there with a style sheet.
OK.
So the script is going to appear we're going to continue writing within here.
So imma do is within the Dykeman's after the document is looked at and everything is ready then we can
proceed with this and create a new Selecta right there.
And this time we are going to create one that targets our text box.
So we'll see a dollar sign excuse me countersigned text box.
And what I want to do is give it an on event.
Now have you done anything with the Photoshop or you can create these kind of like on mousehole or events
or just on either javascript before.
It's very very simple we just say we target that text box text box right down there and we say Ah.
And we tell it what to do as somebody is on and so say and click event that is the event right there
we say come on and say when the mouse is clicked and Mary close it out with a semi-colon.
So a text box when somebody clicks and when the mouse is clicked and then we will also do another one.
That's I retired in the same box here say a text box again.
And again very similar to this type one appears.
Forgot to put my hand side of the ID.
Now again I would say in an event it's as mouse leave.
I'm thinking of all that actually takes their mouse.
Leave all lowercase there.
And those quotes come will say when the mouse leaves camel case or when that mouse leaves and ran.
So my colon there not all can do is.
So you've got those two events that we just created up there.
Once it clicks and once when the mouse leaves that area right there.
What we're trying to do is create a function that says what to happen when something and when those
two events happen.
So say the function would do the first one when Mouse is clicked.
Copy and paste it there so I have the exact same spelling.
Open and close friends.
Opening curly bracket there had returned a couple of times within that curly bracket we can say what
the function is.
When the mouse is clicked and again we would target it using our Jake Query and just like above we say
in the text box where I change the team and that's and we will say open and close our parentheses open
and close a pair of quotes.
Let's do it.
So our stuff that's tough to do is to get our H-1 tag up here and say you collect me now is the actual
HDMI code that's going to put in the text box div using HD Mehl you click to me close that out.
And at the end may or will close it out with a semi-colon.
And we've got a closing curly bracket right there.
So again targeting this on click event when Mouse is clicked the function mouse has clicked replace
the HD mount with each one you click to me.
Now run and do is do one for the mouse.
Leave you've got some time to copy that because there's a lot of code there that we can copy and paste
from and we can say when the mouse leaves so the new function when the mouse leaves what do we want
to do when that happens here.
We're still targeting that text box restall use and H.T. and Moul and you can say
are you going.
All.
It's like proper English there where you go in close out that curly brackets same the rest of the code
is all the same down here.
I go ahead and get rid of this lorgnettes and copy down here.
All right so I just have an empty text box Id get picked up on the last I can that we were working in
if not you can go and type that idea out.
Right now our text box should be about this with this height and this border here this background color.
And these two functions are in place.
Everything looks good.
Let's go in and test it out again.
I have a new file called events that each team will see that come back to my file here.
Open this up box there enough and mouseover unseats says Where are you going.
And if I click it you click to me mouse out again where you go and come back over.
Click again.
You clicked to me.
And a lot of good things you can do using a query and that's.