jQuery & jQuery.UI available test

The following code block:

    if (typeof jQuery != 'undefined') {
        // jQuery is loaded => print the version
    } else {
        alert('jQuery is NOT loaded');

    $(document).ready(function() {
        if (jQuery.ui) {
        } else {
            alert('jQuery.UI is NOT loaded!!');

will either print the JQuery version or inform you if no JQuery library is found.
also warn if jQueryUI is not loaded

What's your thoughts on this?


Protected by WP Anti Spam