-4

There is a very similar question asked here Make A List Item Clickable (HTML/CSS) that I read for help but I couldn't get it to work. I have a link on my webpage that looks like this

<a type="button" data-toggle="dropdown" ...>

that when clicked shows a menu containing an unordered list.

<ul role="menu" ...>
   <li role="presentation" value="thing" onclick="myFunction()"...> <span>some</span> </li>
</ul>

Now what I want is for this li element be clickable and act as if it is a link with the cursor turning into a hand and change color on hover. Then when one of the li elements in the unordered list is clicked I want the function "myFunction" to to run.

Community
  • 1
  • 1
Rebam1
  • 23
  • 3
  • 10
  • heres a solution using jquery `$("UL li").on('click', function (e) { window.location = "http://google.com"; e.preventDefault(); });` – Satinder singh Jul 31 '15 at 08:04
  • I honestly don't see how it is a duplicate when every answer in the supposed duplicate uses a link. Obviously I want to select, not route. – Rebam1 Jul 31 '15 at 08:07