jQuery - check minimal required version

To check whether jQuery is loaded to the page and verify minimum version:

if (typeof jQuery == 'undefined' ||
) {
    throw('jQuery version 1.3.1 or above is required');

Here a regular expression determines a required jQuery version -


For example, for 1.3.1 use


and for 1.2.3 use

profile for Boris Serebrov on Stack Exchange, a network of free, community-driven Q&A sites