Note that there are some explanatory texts on larger screens.

plurals
  1. PO$(this) is causing e is undefined error
    primarykey
    data
    text
    <p>I found lots of people with similar errors but none being caused by $('this'). I did a tutorial and it worked fine, now I am trying to do one on my own and I get the e is not defined error when ever this is called. </p> <p>I really don't know what question to ask, I'm just stumped.</p> <p>Please forgive me if I screw up this code block.</p> <pre><code>$(function () { var nav = $('#nav'); //capture navigation call nav.children('li').addClass('navList'); //groups children (not grandchildren) and applies a class for easier use later $('.navList').each(function () { //.each is like for loop but with functions var that = $(this), //captures this call subMenu = that.find('ul') //groups sub menu items ; that.bind('mouseenter', function (e) { //console.log("that"); subMenu.show().css(); }) .bind('mouseleave', function (e) { subMenu.hide(); }); }); }); </code></pre> <p>HTML-not putting whole thing since it's the schools and I'm not sure how they feel about that. but here is the relevant part.</p> <pre><code> &lt;ul id="nav" class="cf"&gt; &lt;li&gt;&lt;a href="/"&gt;home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/"&gt;tutorials&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;JavaScript&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;jQuery&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;AJAX&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="/"&gt;screencasts&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;JavaScript&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;jQuery&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;AJAX&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="/"&gt;projects&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload