You can just check if the jQuery
object exists:
if( typeof jQuery !== 'undefined' ) ... // jQuery loaded
jQuery().jquery
has the version number.
As for the prefix, jQuery
should always work. If you want to use $
you can wrap your code to a function and pass jQuery
to it as the parameter:
(function( $ ) {
$( '.class' ).doSomething(); // works always
})( jQuery )