Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Accordion to dl>dd+dt after Backbone Rendered code?
    primarykey
    data
    text
    <p>I created a DL, DT, DD definition list, with Backbone with Coffeescript. I used template in my html page below. There is no problem, succesfully rendering html. I looked html in chrome and elements are OK.</p> <p>After all this i tried to make an accordion. And wanted to try all DT hide. But couldnt make any Jquery code to this tags.</p> <p>i used console;</p> <pre><code> $(function () { var allDD= $('div#userList dl').html(); console.log(allDD); }); </code></pre> <p>But nothing log !</p> <p>i searched web nothing found. Also tried;</p> <pre><code> $(document).ready and window.onload() </code></pre> <p>But still nothing happened.</p> <p>How can i make an accordion effect to codes after Backbone render.</p> <p>Please any help?</p> <pre><code> &lt;div id="userList"&gt; // DL &gt; DT+DD will be here &lt;/div&gt; &lt;script type="text/template" id="tpl-user-results"&gt; &lt;dl class="users"&gt;&lt;/dl&gt; &lt;/script&gt; &lt;script type="text/template" id="tpl-user-row-dt"&gt; &lt;span class="percent"&gt;&lt;%= Math.ceil(dt.score) %&gt;&lt;/span&gt; &lt;a href="#" class=""&gt; &lt;%= dt.username %&gt; (&lt;%= dt.score%&gt;) &lt;/a&gt; &lt;/script&gt; &lt;script type="text/template" id="tpl-user-row-dd"&gt; &lt;span class="percent"&gt; &lt;%= dd.username %&gt; (&lt;%= dd.score%&gt;) &lt;img src="/user/0001.jpg"&gt; &lt;p&gt;User Info : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Temporibus reiciendis corporis hic consequatur alias veniam repudiandae architecto. Maiores aliquid sint cupiditate voluptate modi debitis ipsum consequuntur quaerat odit id ipsa.&lt;/p&gt; &lt;/script&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.
 

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