Software Archive
Read-only legacy content
17061 Discussions

$ not found with basic template

T__T_
Beginner
463 Views

I started a basic HTML5 project with App Framework and added some pages and sprite buttons to swap between pages, but the javascript console says $ unknown command, the usual jQuery library not being loaded kind of error.

Is this a bug or am I doing something wrong? It is just the most basic of projects and I seem to be running into problems already. I think swapping to one of the other frameworks made it work but I only need the basic App Framework.

0 Kudos
5 Replies
Ad
New Contributor III
463 Views

Do you get this in the javascript console in your browser/XDK debugger or do you see it in the Javascript console in the XDK editor (JSHint problem)?

If the last one is the case, add /*global $:false */  to the top of the javascript.

 

0 Kudos
Chris_P_Intel
Employee
463 Views

Can you post your code? Are you using App Designer?

0 Kudos
Elroy_A_Intel
Employee
463 Views

Are you including the jQuery JavaScript files explicitly in the HTML file or programatically in your JavaScript files?

0 Kudos
T__T_
Beginner
463 Views

App Designer, in JSHint. I know about the flags and such, but this is a showstopper in something which I thought was supposed to work without expert tips because it is App Designer, why need arcane code knowledge in the App Framework which seems like the recommended option?

0 Kudos
Chris_P_Intel
Employee
463 Views

If it is only a JSHint warning, you can ignore it.  Or, you can, as Elroy suggested, add  a Javascript comment to the top of the offending .js file:

/*global $ */

 

0 Kudos
Reply