Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8460129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:31:16+00:00 2026-06-10T13:31:16+00:00

I am making a tree control using <ul> . Clicking on an item expands

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:31:17+00:00Added an answer on June 10, 2026 at 1:31 pm

    There’s no need to replace your bullets with images. When you bind the onclick event of an li to some function, clicking the bullet seems to fire it as well. To bind the onclick of the bullet to a different function, wrap li text content in a span and assign a different onclick event; something like:

    $("li").click(function() {
       alert("I'm a bullet! Glee's awesome!");
    });
    $("li span").click(function(event) {
       alert("I'm some text! Glee's awesome!");
       event.stopPropagation(); //make sure the li onclick isn't fired
    });
    

    And a little working demo: little link.

    Hope that helped!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a python tree visualizer using wxPython. It would be used like
Python noob using 2.7 on Windows. I'm working on making a hierarchy tree view
I'm making a todo list program using windows forms for one of my university
I'm making a decision tree using the classregtree(X,Y) function. I'm passing X as a
I'm making an application using a dependency tree parser. Actually, the parser is this
We're making a single-page app, where actions in the UI (e.g. clicking a node
I'm using node.js and socket.io, and I'm making a game. There are quite a
I'm making a tree that has several different node types: a binary node, a
Making a drop down list for my JSP and the values I'm entering won't
can you advice what to use for making tree structured text editor? I used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.