Cannot reference any jQuery object

jquery

#1

Can someone help me figure out what I’m doing wrong here? I’m just trying out Hype for the first time and would like to reference a jQuery object and call a hide() function, but no matter what I do, it will not work.

Simple example file is attached: jQuerySample.zip (90.3 KB)

Any help would be much appreciated!


#2

@jkuo1

I downloaded jQuery v3.3.1 here, and added it to your Hype document:
jQuerySample_jQ3.3.1.hype.zip (93.0 KB)

Now your code works. :ok_hand:


(Loves Hype) #3

One has to remember that jQuery is not a part of Hype! Hype uses it it’s own runtime and animation system so any external library you want to use you have to actually include into your source by referencing it in your head section or dragging it to the resource library. The later works for JS files as Hype references the file automatically in your head section! This doesn’t work for all file types but for JS it certainly does .


#4

Hi @JimScott, thanks so much helping me out! I guess I needed the jQuery library, not JQuery UI in order to access the hide() function. :grinning: