javascript: problem with function
- by Zayatzz
hi
I have this simple function:
<script type="text/javascript">
//<![CDATA[
jQuery(function($){
function here(b){alert(b);} ;
here(6);
});
//]]>
</script>
and i have this button on page:
<button onclick="here(7);">TEST</button>
The alert fires on page load, but not on button click. If i replace the here(7) with alert, it works fine. Why doesnt it work with function though?
Alan