<div><span>shanghai</span><span>male</span></div>
For div like above,when mouse on,it should become cursor:pointer,and when clicked,fire a
javascript function,how to do that job?
EDIT: and how to change the background color of div when mouse is on?
EDIT AGAIN:how to make the first span's width=120px?Seems not working in firefox
I suggest to use a CSS class called clickbox and activate it with jQuery:
Now the only thing you have to do is mark your div as clickable and provide a link:
Plus a CSS style to change the mouse cursor:
Easy, isn't it?
This will change the background color as well
As you updated your question, here's an obtrustive example: