Note that there are some explanatory texts on larger screens.

plurals
  1. POid search works only for first element
    text
    copied!<p>I have a block: </p> <pre><code>&lt;div class="col-1-4 local_links"&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;a href="#user_profile"&gt;User Profile&lt;/a&gt;&lt;div class="arrow-selected"&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;a href="#dashboard"&gt;Dashboard&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;a href="#change_password"&gt;Change Password&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; </code></pre> <p>[... some code ....] </p> <pre><code>&lt;div class="col-3-4 local_responses"&gt; &lt;div class="content full" id="user_profile" style="display: block;"&gt; &lt;h2&gt;settings :: User Profile&lt;/h2&gt; &lt;/div&gt; &lt;div class="content full" id="dashboard"&gt; &lt;h2&gt;settings :: Dashboard&lt;/h2&gt; &lt;/div&gt; &lt;div class="content full" id="change_password"&gt; &lt;h2&gt;settings :: Change Password&lt;/h2&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>and some js which follows: </p> <pre><code>var local_links = $(".local_links"); var local_responses = $(".local_responses"); $(("a"),local_links).on("click", function(e){ e.preventDefault(); var id = $(this).attr("href"); local_links.find("div.arrow-selected").remove(); $(this).parent().append('&lt;div class="arrow-selected"&gt;&lt;/div&gt;'); $(".content", local_responses).animate({opacity: 0}); $(id, local_responses).animate({opacity: 1}); }); </code></pre> <p>If I do console.log(id) ... it shows the ID nicely... but it works only with first element. I know I am missing something trivial. Any thoughts? </p>
 

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