Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to have both Javascript divs to be draggable when they are on top of each other?
    primarykey
    data
    text
    <p>I have several <code>div</code>s on top of each other. The top one needs to be draggable and the one below it should still be clickable. I am attaching the picture below so that you can understand more what I mean:</p> <p><img src="https://i.stack.imgur.com/Jx04P.png" alt="http://i.stack.imgur.com/ZqYzF.png"></p> <p>The green <code>div</code>s are inside in one of the cells. When I click on one of the cells I get the menu above. I want to be able to grag the green divs and if I click inside on of the the <code>mouseclick</code> event to be fired upon the cell behind not the parent div.</p> <p>Here is the html of the divs so that you get a better understanding of the structure:</p> <pre><code>&lt;!-- Spot 00,30 ---&gt; &lt;div id="2_0" class="spot"&gt; &lt;/div&gt; &lt;!-- Spot 15,45 ---&gt; &lt;div id="2_0_1" class="spot"&gt; &lt;/div&gt; &lt;!-- Spot 00,30 ---&gt; &lt;div id="2_1" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 15,45 ---&gt; &lt;div id="2_1_1" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 00,30 ---&gt; &lt;div id="2_2" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 15,45 ---&gt; &lt;div id="2_2_1" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 00,30 ---&gt; &lt;div id="2_3" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;div class="wc-event green ui-draggable" ondblclick="showAppointment(20)" style="display: block; height: 210px;" data-id="20" data-type="booking"&gt; &lt;/div&gt; &lt;!-- Spot 15,45 ---&gt; &lt;div id="2_3_1" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 00,30 ---&gt; &lt;div id="2_4" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 15,45 ---&gt; &lt;div id="2_4_1" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 00,30 ---&gt; &lt;div id="2_5" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 15,45 ---&gt; &lt;div id="2_5_1" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; &lt;!-- Spot 00,30 ---&gt; &lt;div id="2_6" class="spot" style="background: none repeat scroll 0% 0% transparent;"&gt; &lt;/div&gt; </code></pre> <p>This is for the dark green <code>div</code>.</p> <p>How can I make it so the top div is draggable while the bottom one is still clickable?</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. 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