Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing jquery and a button to load a div with dynamic content
    primarykey
    data
    text
    <p>I have a js that loads dynamic content from a database and shows the var's in a <code>li</code> element:</p> <pre><code>$("&lt;li id='l_"+marker['__gm_id']+"' class='clinic_list' /&gt;") .html("&lt;div&gt;&lt;strong&gt;"+v.name+"&lt;/strong&gt;&lt;/div&gt; etc...") .click(function() { //displayPoint(marker, i); infowindow.setContent(null); infowindow.open(map,marker); toggleBounce(marker); }) .appendTo("#list"); </code></pre> <p>Now I want to add a button into the <code>li</code> element that opens a div with dynamic content. The button looks likt this:</p> <pre><code>&lt;button class="md-trigger" data-modal="modal-1"&gt;open dynamic div&lt;/button&gt; </code></pre> <p>And the button should open this div (modal dialog by css3):</p> <pre><code>&lt;div class="md-modal md-effect-1" id="modal-1"&gt; &lt;div class="md-content"&gt; &lt;h3&gt;Modal Dialog&lt;/h3&gt; &lt;div&gt; &lt;p&gt;"+v.name+"&lt;/p&gt; &lt;button class="md-close"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>The frontend: <a href="http://www.ihrvorteilsclub.de/home/iv/search/search.php" rel="nofollow">http://www.ihrvorteilsclub.de/home/iv/search/search.php</a></p> <p>The rest of the js: <a href="http://www.ihrvorteilsclub.de/home/iv/search/js/super-store-finder-mobile.js" rel="nofollow">http://www.ihrvorteilsclub.de/home/iv/search/js/super-store-finder-mobile.js</a></p> <p>But it does not work. I don't know how to combine this. When I add the button and try top open the div, nothing happens. Can anybody help me and show me how to do that!</p> <p>Thank you very much!</p>
    singulars
    1. This table or related slice is empty.
    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.
    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