if jquery exists code example
Example 1: javascript if has jquery loaded
window.onload = function() {
if (window.jQuery) {
// jQuery is loaded
alert("Yeah!");
} else {
// jQuery is not loaded
alert("Doesn't Work");
}
}
Example 2: Is there an “exists” function for jQuery
if ($(selector).length)