05-24-2011 12:34 PM
I have a very simple app. In fact it doesn't really do anything as of yet. I started a new WebWorks project in eclipse. I renamed the latest jquery-release.js to jquery.js and dragged it into the project. I then have the followng code in index.html but yet it does not work in a 6.0 simulator. However, it does work in 5.0. I plan on only supporting 6.0 due to the HTML 5 support for local storage. Please help.
05-28-2011 11:19 PM - edited 05-28-2011 11:30 PM
Thanks for the reply. Must have been a long night and didn't see the obvious on the .ready vs. the .load. Thanks for correcting me on that.
I have another issue now where I cannot set onClick functions for a button with an id. I have something like this.
Any thoughts on why this might not work?
05-30-2011 06:22 AM
Expanding on the last comment...
Some of the apps I have written include a very large number of handlers for user actions, dom and CSS alteration etc
Simply put you are not sure until ready() has been called that what things you're trying to do is actually possible at that point
You can, safely, call functions you write from within the ready() bit if you're doing any kinf of bind (click being one) how do you know that the button ID actually exists at that point without testing if it's there first? - The only way is a ready()...
The same applies to CSS and DOM maniplulation
Any direct call to JQuery, not in a function, requires you to know that the bits of the DOM tree you are trying to manipulate actually exist when you do it
One of my apps starts off with not much more than a loading message but then alters a load of CSS, inserts lots of elements into a DIV and binds many events - if I don't do that within ready()
Kudos button over there -> Go press it
05-30-2011 10:57 AM
Thank you guys for the comments, I really appreciate. These were very noob questions. I'm just getting into BB development (trying WebWorks first). Its been a good long whilce since I've messed with jQuery as well. I'm familiar but apparently have forgotten the basics. Thank you.