How to check, if jQuery is used in a given web application?
<p>This may seem like a ridiculous question, but as a newbie to JS/JQuery I've been merrily creating a simple .js file for creating a two column menu, mostly grabbing advice and bits of code from here. I've just come across a solution to something I need, where I need to use different code depending on whether I'm using JS or Jquery - and I have no idea what I'm  using! This is confused by the fact that I was already including the JQuery library for my use of bxSlider (see below), before I started all this.</p>

<p>Apologies if I'm totally misunderstanding something fundamental here..</p>

<p>This is the relevent area from my HTML head:</p>

<pre><code>&lt;!-- jQuery library (served from Google)--&gt;
&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;!-- bxSlider Javascript file --&gt;
&lt;script src="&lt;?php bloginfo('template_directory'); ?&gt;/js/jquery.bxslider/jquery.bxslider.min.js"&gt;&lt;/script&gt;
&lt;!-- bxSlider CSS file --&gt;
&lt;link href="&lt;?php bloginfo('template_directory'); ?&gt;/js/jquery.bxslider/jquery.bxslider.css" rel="stylesheet" /&gt;

&lt;!--Other javascript--&gt;
&lt;script src="&lt;?php bloginfo('template_directory'); ?&gt;/js/menu-two-cols.js"&gt;&lt;/script&gt;
</code></pre>

<p>And this is my "menu-two-cols.js" file so far:</p>

<pre><code>function menuTwoCols() {

var browserH = $(window).height();

if (browserH &gt; 630) {
    //do nothing - menu can stay as a single column
}else{
    //do everything below

//make width auto for measurement for this child
$('.menu-header li:nth-child(6) li').css({'width':'auto'});

var maxOdd = 0;
var maxEven = 0;
var listItemNum = $(".menu-header li:nth-child(6) li").length;

console.log("First level menu (6) ODD num widths");
$('.menu-header ul li:nth-child(6) ul li:nth-child(odd)').each(function() {
    var $this = $(this);
    var colWidth = $this.outerWidth();
    if (colWidth &gt; maxOdd) {
        maxOdd = colWidth;
    }
console.log(colWidth);   
});
console.log("Max Odd = " + maxOdd);

console.log("First level menu (6) EVEN num widths");
$('.menu-header ul li:nth-child(6) ul li:nth-child(even)').each(function() {
    var $this = $(this);
    var colWidth = $this.outerWidth();
    if (colWidth &gt; maxEven) {
        maxEven = colWidth;
    }
console.log(colWidth);   
});

console.log("Max Even = " + maxEven);    

var maxBoth = maxOdd + maxEven;
var maxOddPc = ((maxOdd / maxBoth) * 100)+"%";
var maxEvenPc = ((maxEven / maxBoth) * 100)+"%";

console.log("Max BothPx = " + maxBoth + '\n' +
            "Max Odd% = " + maxOddPc + '\n' +
            "Max Even% = " + maxEvenPc + '\n' +
            "List Item Num = " + listItemNum + '\n');

console.log("Text content");
console.log($('.menu-header ul li:nth-child(6) ul').text() + ' _ ');

//make changes to widths if no space for single column
$('.menu-header ul li:nth-child(6) &gt; ul').css('width', maxBoth);
$('.menu-header li:nth-child(6) li:nth-child(odd)').css('width', maxOddPc);
$('.menu-header li:nth-child(6) li:nth-child(even)').css('width', maxEvenPc);
$('.menu-header ul li:nth-child(6) ul li:nth-child(2)').css({'border-top':'5px solid #fff'}); //top white line

}//end of if statement

}
</code></pre>