-
ubervu
-
Apple iPhone
-
Nexus One
+ Add

By: Nate
Updated 2 months ago
Source:
http://trevordavis.net/
@Trevor-
I think if you say, “This is our list of $whatevers”, and you have an ordered list of items, the meaning of those items is the same as if they had an invisible #1-10 next to them. Whether that ranking means “best” or “worst” or “funniest” or whatever is, of course, subject to the nature of the content. But it makes me feel like it’s still well worth having the script reverse the actual items.
That said, there’s ...
Showing 26 relevant reactions out of 29.
Steward 2 months, 2 weeks ago on Wordpress
May be better without unnecessary variable “start”?
$(document).ready(function() {
$('.reversed').each(function() {
var $children = $(this).children('li');
var totalChildren = $children.length;
$children.each(function() {
$(this).val(totalChildren--);
});
});
});
I don’t understand –
...
See all content
Reply
CSS Brigit | Reversed Ordered List with jQuery 2 months, 4 weeks ago on Wordpress
Reversed Ordered List with jQuery…
How to create an ordered list that counts in reverse with jQuery.
…
Reply
jquerybuzz 2 months, 4 weeks ago on Twitter
Reversed Ordered List with jQuery | Trevor Davis http://bit.ly/2DJNTf
Reply
palleman 2 months, 4 weeks ago on Twitter
Reversed Ordered List with jQuery: http://bit.ly/GSord #jQuery
Reply
Dave_Bush 2 months, 4 weeks ago on Twitter
New Link: Reversed Ordered List with jQuery | Trevor Davis: We are also going to add a class to the or.. http://bit.ly/49dbsW
Reply
Reversed Ordered List with jQuery | Trevor Davis 2 months, 4 weeks ago on Wordpress
[...] Reversed Ordered List with jQuery | Trevor Davis – [...]
Reply
44crosbyrow 2 months, 4 weeks ago on Twitter
Reversed Ordered List with jQuery | Trevor Davis http://bit.ly/1nPKr7
Reply
elijahmanor 3 months ago on Twitter
"Reversed Ordered List with jQuery" #tech #jquery http://j.mp/49KBpb
Reply
Nate 3 months ago on Wordpress
@Trevor-
I think if you say, “This is our list of $whatevers”, and you have an ordered list of items, the meaning of those items is the same as if they had an invisible #1-10 next to them. Whether that ranking means “best” or “worst” or “funniest” or whatever is, of course, subject to the nature of the content. But it makes me feel like it’s
...
See all content
Reply
Trevor 3 months ago on Wordpress
@Nate-
Stupid WordPress.
Agreed, so I guess it just depends on whether there is a reference somewhere on the page saying that this list is presented in a certain order for a specific reason. If not, then I don’t think too much value is added in reversing it for non-JavaScript users.
I wonder what kind of load reversing the list adds to the page. I’m sure it’s
...
See all content
Reply
Nate 3 months ago on Wordpress
I had <pre> tags, man: I think it was stripped out by your demon CMS. (Don’t be sad, WordPress, I didn’t mean it.)
I guess technically there’s nothing but order necessarily implied by an unordered list, but there are default ways, as far as browsers are concerned, of interpreting them, and the default is as a numbered list. In this instance, I think browsers behave
...
See all content
Reply
Nate 3 months ago on Wordpress
This is the sort of thing I mean:
This is number one.
This is number two.
This is number three.
This is number four.
$(document).ready(function() {
$('.reversed').each(function() {
var children = $(this).children('li').get();
$(this).empty();
children.reverse();
$(this).append(children);
$(children)
...
See all content
Reply
Tweets that mention Reversed Ordered List with jQuery | Trevor Davis -- Topsy.com 3 months ago on Wordpress
[...] This post was mentioned on Twitter by Mike Lane, Dimox and Trevor Davis, Dimox. Dimox said: Reversed Ordered List with #jQuery – http://bit.ly/3aF6G2 [...]
Reply
Dimox_ru 3 months ago on Twitter
Переворачиваем нумерованный список с помощью #jQuery - http://bit.ly/3aF6G2
Reply
Nate 3 months ago on Wordpress
Sometimes it’s the simple things in life. One of the things I love about jQuery is finding out how effortless and straightforward it is to do deeply satisfying things like this to one’s code.
The only, very small, concern I have about this is that the meaning of the ordered list in so far as the mark-up is concerned is exactly opposite what you intend it to be. The javascript doesn’t
...
See all content
Reply
davist11 3 months ago on Twitter
Just wrote a short blog article about creating a reversed ordered list with jQuery http://bit.ly/4z4E5V
Reply
Follow us
Twitter Facebook