Of course it would fail if the function didnt exist.

Thats the point.

He wanted to know how to check if it was loaded or not, so If the alert
doesnt show up, its not loaded.

On Feb 6, 2008 11:48 PM, Shawn <[EMAIL PROTECTED]> wrote:

>
> That would fail if jQuery hasn't loaded.  It would give an error saying
> something like "$ has no properties", or "$ is not a function".
>
> You could try something like this:
>
> if (jQuery) { alert("jQuery loaded"); }
>
> I haven't tested this but don't see why it wouldn't work...
>
> HTH
>
> Shawn
>
> Kyle Browning wrote:
> > $(document).ready(function() {
> >    alert('hi');
> > });
> >
> > This uses jQuery's .ready function on the document object
> >
> > On Feb 6, 2008 2:41 PM, MikeeBee <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >
> >     Is there a small piece of code you can put on a page to test if
> jquery
> >     has loaded?
> >
> >     Thanks
> >
> >
>

Reply via email to