Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Dropdown by a jQuery Dummy
    primarykey
    data
    text
    <pre><code>function rightFrame(e) { $('#' + e).css({ 'position': 'relative', 'top': '0px', 'left': '30px', 'visibility': 'visible' }); $('#' + e).show(); } $(document).ready(function() { $('.link').mouseover(function(e) { rightFrame($(this).data('item')); }); $('.link').mouseout(function(e) { if ($(this).is(":visible") == true) { if ($(this).is(':hover') == true) { $('.right').hide(); } } }); }); </code></pre> <p>Okay just to qualify here, I know practically nothing about jQuery or JavaScript. I started with the base code to get the dropdown-type box to appear, and then fiddled with it to make it as it is. My goal is to have the dropdown appear when you hover over the link while still allowing you to click inside the dropdown, as a dropdown navigation should. But, as I said, I'm kind of a dummy when it comes to jQuery/JS. Help!</p> <p>PS - Link refers to the link that you hover over in order for the dropdown to appear. Right refers to the dropdown itself.</p> <pre><code>&lt;div id="leftcontent"&gt; &lt;hr size="1" color="#555" /&gt; &lt;a href="#"&gt;&lt;div class="link" data-item="r1"&gt;HOME&lt;br /&gt;&lt;span class="littlelink"&gt;THE HOMEPAGE&lt;/span&gt;&lt;/div&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;div class="right" id="r1"&gt;asdf&lt;/div&gt;&lt;/a&gt; &lt;hr size="1" color="#555" /&gt; &lt;a href="#"&gt;&lt;div class="link" data-item="r2"&gt;PORTFOLIO&lt;br /&gt;&lt;span class="littlelink"&gt;SOME OF MY WORK&lt;/span&gt;&lt;/div&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;div class="right" id="r2"&gt;asdf&lt;/div&gt;&lt;/a&gt; &lt;hr size="1" color="#555" /&gt; &lt;a href="#"&gt;&lt;div class="link" data-item="r3"&gt;PRICES&lt;br /&gt;&lt;span class="littlelink"&gt;YOUR INVESTMENT&lt;/span&gt;&lt;/div&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;div class="right" id="r3"&gt;asdf&lt;/div&gt;&lt;/a&gt; &lt;hr size="1" color="#555" /&gt; &lt;a href="#"&gt;&lt;div class="link" data-item="r4"&gt;CONTACT&lt;br /&gt;&lt;span class="littlelink"&gt;GET IN TOUCH&lt;/span&gt;&lt;/div&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;div class="right" id="r4"&gt;asdf&lt;/div&gt;&lt;/a&gt; &lt;hr size="1" color="#555" /&gt; &lt;/div&gt;&lt;!-- end leftcontent --&gt; </code></pre>
    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.
    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