1

I am trying to do some responsive fix - Currently I have a list somthing like this:

<ul>
  <li>666</li>
  <li>555</li>
  <li>444</li>
  <li>333</li>
  <li>222</li>
  <li>111</li>
</ul>

If the screen size is less then 767px, I like it to change the order like this :

<ul>
  <li>111</li>
  <li>222</li>
  <li>333</li>
  <li>444</li>
  <li>555</li>
  <li>666</li>
</ul>

And fix them back to current state if the size increases.

I understand that this cannot be done through CSS media query, I need your help fixing it through jQuery.

Thanks for your help in advance.

Salman A
  • 262,204
  • 82
  • 430
  • 521
Syed
  • 15,657
  • 13
  • 120
  • 154
  • 1
    @laaposto - Seems I should have checked the edit history to know what you meant - obviously that's not valid. I just took you literally by your word "must close your li", which isn't accurate, but given the weird markup I get why you said that. It's simpler than "must not open more
  • than you need - either close using slash (
  • ) or take out the trailing
  • "
  • – Julix Jan 04 '19 at 17:57