Here\'s the problem:
I have an ol li ordered list with a start attribute like so:
Here is my jank solution.
Prepend with js x li's at the beginning of the ol. Then hide them by positionning them absolute and throwing them to the moon.
$('ol[start]').each(function(){
var start = $(this).attr('start');
//console.log(start);
for(var i=1;i');
}
})
ol{
counter-reset: items;
padding:0;
padding-left: 46px;
}
ol li {
display: block;
counter-increment: items;
text-indent: -22px;
margin-bottom: 25px;
}
ol li.hidden{
visibility:hidden;
position:absolute;
left:-999vw;
}
ol li:before {
content: "0" counter(items)". ";
color:green;
display:inline-block;
width:22px;
font-size:14px;
}
ol li:nth-child(n+10):before {
content: "" counter(items)". ";
}
- Item 4
- Item 5
- Item 6
- Item 7
- Item 8
- Item 9
- Item 10