Something like this will work just get the attr data-tick and do a loop creating the elements
$("ul").each(function(){
var li = parseInt($(this).attr("data-tick"))
for(i = 0; i < li; i++){
//Create an li and append it to this = ul element
$("<li/>").appendTo(this)
}
})