Quote:
I have heard that it is intended to formulate a JavaScript library that will work on most, if not all, browsers, unlike raw JavaScript. Is that right?
|
Not entirely. JavaScript *is* cross as all modern browsers support it. However, the way they support it is inconsistent. E.g. behavior differs between browsers, and some have a wider feature set than others. jQuery overcomes this by providing a layer on top of JavaScript that works the same, regardless of the browser used. Interally, it makes up for the quirks and differences between browsers by having different behavior depending on the supported features and their implementation.
With regard to your example: you're mixing two things up. Either don't use the jQuery docuent ready, but simply use OnClientClick and your validateCampaignData function, or use jQuery's document ready, drop the function header for validateCampaignData and inside the doocument ready block dynamically bind the click handler to the controls and provide it the code you want to excute. For more info about the latter:
http://api.jquery.com/bind/
For future posts, can you please a) use the Remove Text Formatting button on the editor's toolbar to clear color coding and work around a bug in this forum that deletes spaces and b) post the resulting HTML in the browser? The former makes it easier to see what you're trying to do, and the latter shows how your code ends up.
Cheers,
Imar