|
-
Dec 21st, 2011, 04:59 PM
#1
Thread Starter
Fanatic Member
javascript order by?
I'm trying to sort these "boxes" by subject, or content (line 4 and 5 in the code) ASC or DESC, but I cannot use PHP, it has to be JavaScript (JQuery preferably)... the problem is, I have no clue on where to start, any references or code examples would be much appreciated.
these are the boxes, how they are formatted:
HTML Code:
<div class="box container">
<a href=""><div class="box image"></div></a>
<div class="box text">
<div class="box subject">1 subject</div>
<div class="box content">4 some content here</div>
</div>
</div>
<div class="box container">
<a href=""><div class="box image"></div></a>
<div class="box text">
<div class="box subject">2</div>
<div class="box content">1</div>
</div>
</div>
<div class="box container">
<a href=""><div class="box image"></div></a>
<div class="box text">
<div class="box subject">3 subject</div>
<div class="box content">2 some content here</div>
</div>
</div>
<div class="box container">
<a href=""><div class="box image"></div></a>
<div class="box text">
<div class="box subject">3</div>
<div class="box content">3</div>
</div>
</div>
Thanks in advance,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|