- Home
- Interview Questions
- Javascript
You can check for the existence of the JSON object using the typeof operator,
if(typeof JSON == 'object') {
// you have JSON support, go ahead!
} else {
// find another way to work, e.g. using eval()
}
Of course, you must be sure that your script hasn’t defined its own object called JSON, or this won’t work as expected.
Yes it is, but at the time of writing this does not work very well cross-browser. Mozilla browsers support the cssRules array, while Internet Explorer calls the equivalent array Rules. There is also considerable difference among browsers in how the notion of a “rule” is interpreted. It’s to be hoped that future browser versions will resolve these differences.
Yes, it is. The style object has a property called cursor that can take various
values. Popular cursors include the following:
Crosshair—Pointer renders as a pair of crossed lines like a gun sight.
-> Pointer—Usually a pointing finger.
-> Text—Text entry caret.
-> Wait—The program is busy.
At the time of writing, 2D transforms are available in all popular current browsers, while 3D transforms are supported in Safari, Chrome/Chromium, and Firefox. Transitions and 3D transforms were added in IE10. Most of these effects degrade sensibly, so a user having a browser without support will still be OK, but will see the page elements without animation.
The process varies slightly from library to library. Usually it’s simply a matter of including one or more external .js files into the
part of your web page.Yes, in theory: If the libraries are well written and designed not to interfere with each other, there should be no problem combining them. In practice, this depends on the libraries you need and how they were written.
Yes, jQuery can be used with other libraries. jQuery provides a means to prevent conflicts with the jQuery.noConflict() method. You can read about it at http://docs.jquery.com/Using_jQuery_with_Other_Libraries.
Yes you can.
When jQuery UI generates markup, it applies classes to the newly created markup items. These classes correspond to CSS declarations in the jQuery UI CSS Framework.
Ajax is an acronym for Asynchronous JavaScript And XML. In practice, though, Ajax is by no means limited to returning just XML data.