mbraak / jqTree

Tree widget for jQuery
https://mbraak.github.io/jqTree/
Apache License 2.0
1.02k stars 177 forks source link

make div clickable #100

Closed williamherry closed 11 years ago

williamherry commented 11 years ago

only the tree title(the content) and little icon can click, how to make the tag that contain tree title to clickable

mbraak commented 11 years ago

JqTree does not support that at this moment. I will look into it.

Is there a reason you want to handle the click event on this element?

williamherry commented 11 years ago

@mbraak I think it is fit people's expect, that when mouse move on something, and pointer change to hand, people(at lest me) will thing it is clickable

I am new to web develop and can't figure it out by myself

mbraak commented 11 years ago

Yes, that sounds like an improvement. I will look into it.

rosenfeld commented 11 years ago

I change the cursor myself but if the only thing you want is to change the cursor for the title you can do that by adding a simple CSS rule to your stylesheets.

williamherry commented 11 years ago

@rosenfeld no, I want the entire tag(the entire line) that contain tree title can be clickable

rosenfeld commented 11 years ago

It depends on what you put on the title. If you only put the title itself there, then you're right. But it is just a div, so I put everything there and create another element to hold the actual title inside that original title element.

williamherry commented 11 years ago

@rosenfeld you are right, seem work

mbraak commented 11 years ago

This is now implemented in the dev branch.

Clicking on the div element will trigger the tree.click event. It will also select the node.

williamherry commented 11 years ago

so effective, thanks