.

jQuery & jQuery.UI available test

The following code block:

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

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

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