Note that there are some explanatory texts on larger screens.

plurals
  1. POOrder ul list by span content
    primarykey
    data
    text
    <p>I am really lost with trying to order an ul list by the span in the li.</p> <p>I have this next structure</p> <pre><code>&lt;ul id="videosList"&gt; &lt;li class="response1"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Alex breaking bad&lt;/span&gt;&lt;li&gt; &lt;li class="response1"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Jason playing piano&lt;/span&gt;&lt;li&gt; &lt;li class="response1"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Jenny skying&lt;/span&gt;&lt;li&gt; &lt;li class="response1"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Chuck norris&lt;/span&gt;&lt;li&gt; &lt;li class="response1"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Zyxwaa&lt;/span&gt;&lt;li&gt; &lt;li class="response1"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Realtek&lt;/span&gt;&lt;li&gt; &lt;li class="response2"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Bad alex breaking&lt;/span&gt;&lt;li&gt; &lt;li class="response2"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Piano playing Jason&lt;/span&gt;&lt;li&gt; &lt;li class="response2"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Skying Jenny&lt;/span&gt;&lt;li&gt; &lt;li class="response2"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Norris chuck&lt;/span&gt;&lt;li&gt; &lt;li class="response2"&gt;&lt;a href="link"&gt;&lt;img src="moon" /&gt;&lt;span&gt;Intel&lt;/span&gt;&lt;li&gt; &lt;/ul&gt; </code></pre> <p>I have that list generated from some uploaded videos and separated because respnse1 brings videos from X database and response brings videos from Y database. What I want to do is to order the list by the content of the SPAN in LI.</p> <p>I've tried a few things from google and stackoverflow but I couldn't adapt any 1 to fit what I need.</p> <p>So thats it, how can I order an list with javascript/jquery by the content of SPAN in LI?</p>
    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.
 

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