hi this is Alex from PHP academy.org
with a video tutorial for the New Boston
in the last video we looked at including
jQuery into our page however we don't
actually know whether we have this
functionality available now if we save
this page and go over to our um browser
you'll see that we don't get any errors
now this doesn't necessarily mean that
jQuery has has has or has not been
included into our page it's different to
other langu because it's just a script
file so we're not sure yet um if uh
jQuery is actually working this script
tag will not return an error if this
source is not found so it's extremely
important that we just create a quick
test to see if uh jQuery is working or
not so don't worry if you don't
understand the code I'm using just yet
but if you are foll following along with
this tutorial and you've included jQuery
using this line um this uh line that I'm
just about to write we'll just add some
clarification whether to whether as to
if we uh actually have included jQuery
properly so I'm going to go ahead and
create some paragraph tags and inside
I'm going to write some text so this is
some text or this is a paragraph would
be more
appropriate now the P will take other
attributes uh such as
onclick um on Mouse over and we can use
standard JavaScript to then call uh the
jQuery library or functions from the
jQuery Library so let's go ahead and say
p uh on
click now in normal JavaScript we could
do something like alert or in raw
JavaScript we could do something like
alert
works and when we click uh this text
inside of this paragraph We will be
produced with an alert box to say works
so let's go ahead and test this first of
all here's my paragraph and if I click
it you can see that I get an alert box
up saying works so JavaScript itself is
obviously working because this is
automatically uh available to us however
we need to go ahead and test jQuery so
let's go ahead and write a dollar inside
of this dollar I'm going to write this
or inside of these parentheses next to
this dollar I'm going to write this and
then I'm going to say do hide and then
brackets and then a uh a semicolon to to
end this line so essentially what we're
doing is hiding using the hide function
and this which refers to the current
element which is our paragraph element
so this is jQuery code and this hide
functionality is a function of jQuery so
now if this works when we click on the
paragraph This paragraph should be
hidden we'll know that jQuery is
actually working so let's go ahead to
our browser and refresh the page here's
the paragraph when I click it you'll see
that the paragraph disappears so we now
know that jQuery has been successfully
included into our page