Note that there are some explanatory texts on larger screens.

plurals
  1. POadd image src and <a> href in List.js
    primarykey
    data
    text
    <p>I am using a plugin List.js. Its working fine. But don't know how to add image src or href values in it. It works fine with and other tags.</p> <p>Here is the URL for List.js. <a href="http://listjs.com/" rel="nofollow">http://listjs.com/</a></p> <p>and here is the documentation. <a href="https://github.com/javve/list" rel="nofollow">https://github.com/javve/list</a></p> <p>here is my code.</p> <pre><code>&lt;script src="http://code.jquery.com/jquery-1.9.0.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/jquery-migrate-1.0.0.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt; </code></pre> <p></p> <pre><code>&lt;div id="Div1"&gt; &lt;input class="search" id="Text1" /&gt; &lt;span class="sort" data-sort="name"&gt;Sort by name&lt;/span&gt; &lt;span class="sort" data-sort="desc"&gt;Sort by desc&lt;/span&gt; &lt;ul class="list"&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div style="display: none;"&gt; &lt;div id="hacker-item1"&gt; &lt;div style="width: 20%; float: left"&gt; &lt;table&gt; &lt;tr&gt; &lt;td colspan="2" align="center" valign="top"&gt; &lt;a href=""&gt; &lt;img alt="" width="125" height="125" border="0" class="name"&gt; &lt;/img&gt; &lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center" valign="top" class="desc"&gt; &lt;br&gt;&lt;/br&gt; &lt;/td&gt; &lt;td class="createdDate"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;h3 class="name"&gt;&lt;/h3&gt; &lt;p class="desc"&gt;&lt;/p&gt; &lt;p class="createdDate"&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;script src="list.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var options = { item: 'hacker-item1' }; var values = [ { name: 'Jonny', desc: 'Stockholm', createdDate: 'June 8, 2013' } , { name: 'Jonny', desc: 'Stockholm', createdDate: 'May 8, 2013' } , { name: 'sssssss', desc: 'eeeeeeeee', createdDate: 'June 20, 2013' } ]; // values.push({name : xml.getElementsByTagName("title")[0].childNodes[0].nodeValue, desc : xml.getElementsByTagName("title")[0].childNodes[0].nodeValue,createdDate : xml.getElementsByTagName("publishdate")[0].childNodes[0].nodeValue}); var hackerList = new List('Div1', options, values); //alert(hackerList.items.length + '--'); &lt;/script&gt; </code></pre> <p></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.
 

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