Replacing OL LI numbers with graphic symbols in jQuery
jQUery November 27th, 2008I wanted a way to replace the numbered bullets in an ordered list with graphical equivalents. Here’s a succinct solution:
-
$(‘ol li’).each(function(i){
-
$(this).css(
-
{ "padding-left":"40px",
-
"list-style":"none",
-
"background":"url(/images/"+(i+1)+".png) no-repeat"}
-
);
-
});

