jquery - javascript "onclick" event fails just in Chrome -


i'm correcting webpage has bug, , detected it, don't know basis.

this js works perfect in firefox , explorer, not in chrome.

so, here go:

--html--

<div id='mesa' onclick='gotosection( mesa  )' > 

--javascript--

<script type="text/javascript">      function gotosection( section ){         alert( section );         $( '#section_container div' ).css( "display" , "none" );         $( section ).css( "display" , "block" );     } </script> 

--

so, in firefox, alert says "[object htmldivelement]", in chrome alert says "undefined".

try

<div id='mesa' onclick='gotosection( "#mesa" )' >


Comments