Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with jQuery plugin TinySort
    text
    copied!<p>I'm trying to sort a list with the help of jQuery and the <a href="http://tinysort.sjeiti.com/" rel="nofollow noreferrer">TinySort</a>-plugin, and it works good but one thing is not working as i want. My Code is:</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8" /&gt; &lt;title&gt;TinySort problem&lt;/title&gt; &lt;script type="text/javascript" src="http://so.volmar.se/oldstatic/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://so.volmar.se/oldstatic/jquery.tinysort.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function pktsort(way){ if($("div#paket&gt;ul&gt;li.sortdiv&gt;a#s_abc").text() == "A-S"){ $("div#paket&gt;ul&gt;li.sortdiv&gt;a#s_abc").text("S-A"); $("div#paket ul li.sortable").tsort("",{place:"org",returns:true,order:"desc"}); }else{ $("div#paket&gt;ul&gt;li.sortdiv&gt;a#s_abc").text("A-S"); $("div#paket ul li.sortable").tsort("",{place:"org",returns:true,order:"asc"}); } } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="paket" title="Paket"&gt; &lt;ul class="rounded"&gt; &lt;li class="sortdiv"&gt;Sort: &lt;a href="#" onclick="pktsort();" class="active_sort" id="s_abc"&gt;A-S&lt;/a&gt;&lt;/li&gt; &lt;li class="sortable"&gt;Almost Famous&lt;/li&gt; &lt;li class="sortable"&gt;Children of Men&lt;/li&gt; &lt;li class="sortable"&gt;Coeurs&lt;/li&gt; &lt;li class="sortable"&gt;Colossal Youth&lt;/li&gt; &lt;li class="sortable"&gt;Demonlover&lt;/li&gt; &lt;li class="sortable"&gt;Femme Fatale&lt;/li&gt; &lt;li class="sortable"&gt;I'm Not There&lt;/li&gt; &lt;li class="sortable"&gt;In the City of Sylvia&lt;/li&gt; &lt;li class="sortable"&gt;Into the Wild&lt;/li&gt; &lt;li class="sortable"&gt;Je rentre à la maison&lt;/li&gt; &lt;li class="sortable"&gt;King Kong&lt;/li&gt; &lt;li class="sortable"&gt;Little Miss Sunshine&lt;/li&gt; &lt;li class="sortable"&gt;Man on Wire&lt;/li&gt; &lt;li class="sortable"&gt;Milk&lt;/li&gt; &lt;li class="sortable"&gt;Monsters Inc.&lt;/li&gt; &lt;li class="sortable"&gt;My Winnipeg&lt;/li&gt; &lt;li class="sortable"&gt;Ne touchez pas la hache&lt;/li&gt; &lt;li class="sortable"&gt;Nói albinói&lt;/li&gt; &lt;li class="sortable"&gt;Regular Lovers&lt;/li&gt; &lt;li class="sortable"&gt;Shaun of the Dead&lt;/li&gt; &lt;li class="sortable"&gt;Silent Light&lt;/li&gt; &lt;li class="addmore"&gt;&lt;b&gt;This text is not supposed to move&lt;/b&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>you can try it out at: <a href="http://www.volmar.se/list-prob.html" rel="nofollow noreferrer">http://www.volmar.se/list-prob.html</a> </p> <p><strong>MY PROBLEM IS:</strong> I don't want the <code>&lt;li class="addmore"&gt;</code> to move above all the <code>&lt;li class="sortable"&gt;</code>-elements when i press the sort-link. i wan't it to always be in the bottom.</p> <p>you can find documentation of the TinySort plugin <a href="http://tinysort.sjeiti.com/" rel="nofollow noreferrer">here</a>. i've tried loads of combinations with place and returns propertys but i just can't get it right.</p>
 

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