onclick works in Internet Explorer and firefox but not chrome

I have a simple function and some online code in with boostrap

Here is the function

		 function getList() {
		 	alert("this is list");

Open in new window

and here is the inline code


<div class="btn-group pull-right">				
	 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">Get list</button>
  <ul class="dropdown-menu" role="menu" style="z-index:4;">
	<li class="sas" onclick="getList()">All List</li>
	li class="sas" onclick="getHighest()">Highest Price</li>

Open in new window

I just need to ensure it works in Chrome also
Who is Participating?
GaryConnect With a Mentor Commented:
Nothing wrong with the code you have posted bar a missing opening tag (<) here

li class="sas"
Dave BaldwinFixer of ProblemsCommented:
The second <li> has a different function listed for the onclick... getHighest()
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.