Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Please check out this JSFiddle: <a href="http://jsfiddle.net/zvCvL/5/" rel="nofollow">http://jsfiddle.net/zvCvL/5/</a></p> <p>Although I have left several comments detailing how this should be done, I will summarize below:</p> <ul> <li><p>Loop through each of the items and their descriptions using Django's templating engine's looping feature (this part is going to be left up to you to figure out, but I have left you a link in the fiddle to get you started) For example, you will be adding these to your <code>tbody</code> in each of your loops: </p> <pre><code>&lt;!-- loop iteration one --&gt; &lt;tr&gt; &lt;td class="item1"&gt;Item 1&lt;/td&gt; &lt;td class="item1"&gt;The first item&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>Do not forget, however, that my method requires that a unique name be given to the <code>td</code>'s in every iteration.</p></li> <li><p>Then, you can work on the dropdown. This will require a simplier loop, just adding these to the <code>ul</code> which acts as your dropdown:</p> <pre><code>&lt;!-- loop iteration one --&gt; &lt;li class="item1"&gt;&lt;a&gt;Item 1&lt;/a&gt;&lt;/li&gt; </code></pre> <p>Once again, this requires a unique class name, yet one that corresponds to the class name given to the item in table.</p></li> <li><p>Finally, you have your JavaScript to take care of. Simply, you can check to see if the user is hovering over an <code>li</code>, check which class it belongs to, and apply some sort of color to all elements which have that same class. Of course, one caveat is that this will act upon <strong>all</strong> list elements. I'll leave it up to you to change that as needed.</p></li> </ul> <p>Hopefully this helps! (The ultimate result is: <a href="http://jsfiddle.net/zvCvL/5/embedded/result/" rel="nofollow">http://jsfiddle.net/zvCvL/5/embedded/result/</a>)</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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