Use Your Own Bullets in JQuery

by Sanju 2012-07-05 09:47:44

Use Your Own Bullets in JQuery

Sometimes you want to break away from the usual circle and square bullets and say, use an EM dash or even an image. There are two steps to this:

JavaScript:


$("ul").addClass("Replaced");
$("ul > li").prepend("‒ ");


This adds an extra class to each affected ul element, this means we can apply alternate styling to the list.

CSS:


ul.Replaced {
list-style : none;
}

Tagged in:

1011
like
0
dislike
0
mail
flag

You must LOGIN to add comments