Note that there are some explanatory texts on larger screens.

plurals
  1. POWeird Message from JQuery - Assuming it wasn't found
    primarykey
    data
    text
    <p>I have some HTML like this:</p> <pre><code>&lt;div class="form-group"&gt; &lt;label class="col-sm-3 control-label"&gt; Carousel &lt;/label&gt; &lt;div class="col-sm-5"&gt; &lt;select class="form-control carouselUser" name="aisis_options[carousel]"&gt; &lt;option value="Please Select a Role"&gt;Please Select a Role&lt;/option&gt; &lt;option value="Administrator"&gt;Administrator&lt;/option&gt; &lt;option value="Editor"&gt;Editor&lt;/option&gt;&lt;option value="Author"&gt;Author&lt;/option&gt; &lt;option value="Contributor"&gt;Contributor&lt;/option&gt; &lt;option value="Subscriber"&gt;Subscriber&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I then attempted to do something like this:</p> <pre><code>$('.carouselGlobal').change(function(){ console.log($('.form_group .col-sm-5 .carouselUser')); $('.form_group .col-sm-5 .carouselUser').hide(); }); </code></pre> <p>I'm more interested in the <code>console.log()</code> which spits out:</p> <pre><code>[prevObject: x.fn.x.init[1], context: document, selector: ".form_group .col-sm-5 .carouselUser", jquery: "1.10.2", constructor: function…] </code></pre> <p>I have no idea what this means so I assume that it can't find the object in question.</p> <p><strong>What are you trying to do?</strong></p> <p>Some where on the page is that piece of HTML I showed you, when the <code>.carouselGlobal</code> changed it (the piece of HTML) needs to hide. </p> <p><strong>Problem?</strong></p> <p>I get that weird message in the console, which I assumes is jquery saying "I cannot find object bla".</p> <p>So what am I doing wrong? From what I thought, this was right ....</p> <p>Even doing something like:</p> <pre><code>$('.carouselGlobal').change(function(){ console.log($('.carouselUser').parent('.form_group')); $('.carouselUser').parent('.form_group').hide(); }); </code></pre> <p>Doesn't work ... </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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