I am making a tree control using <ul>. Clicking on an item expands or collapses the node.
List images (bullets) are not clickable, so the solution seems to be to hide them and just show my own image. The problem with this is that when an item wraps to the next line, the default wrapping indent behavior of a list item is lost.
How can I achieve what I want in CSS?
There’s no need to replace your bullets with images. When you bind the
onclickevent of anlito some function, clicking the bullet seems to fire it as well. To bind theonclickof the bullet to a different function, wraplitext content in aspanand assign a differentonclickevent; something like:And a little working demo: little link.
Hope that helped!