언어 설정

Menu
Sites
Language
[wearable] Using jQuery in a widget app

Hi,

I'm just trying to use jQuery functions like this:

 

I get the error : '$' is not defined.

If i use it inline, i won't work either:

 

 

(yes i know i'm missing a dot at .addClass(), but it won't work either. Even if i try using .hide() or something else.)

My folder structure looks like this:

 

 

 

How can i include jQuery? None widgets has a lib which they then include in the html file.

I can't seem to include jQuery in html page for widgets.

Any help would be nice

 

 

 

Edited by: John Ixion on 23 7월, 2017

Responses

4 댓글
André Reus

hi Marcel Croes

I tried to use Jquery in my Tizen Web widget project. I couldn't able to work it. Now i am using Javascript for my purposes. For example for add class you can use js => https://stackoverflow.com/questions/507138/how-do-i-add-a-class-to-a-given-element

And there are some basic mistakes what you have tried. Like, you haven't add jquery reference in your html, you have to write code inside window.onload function etc. 

 

Slawek Kowalski

Missing reference link to jquery file.

 

John Ixion
Hex Chang

Update: Starting with SDK version 2.3.1, jQuery isn't included any more. So users of SDK version 2.3.1 (and probably higher) should add jQuery manually to their project.

 

 

quote from https://stackoverflow.com/questions/32433807/proper-way-of-adding-jquery-to-a-tizen-web-app-for-wearables