function inside $(document).ready(function(){});
Hi,
I want to have this code
- $(document).ready(function(){
- function doSomething(){
- alert('hello');
- }
- });
in my HTML code I want to call function which is declared inside $(document.ready()
<div onclick="doSomething();"></div>
but this does not work. How can I call function from html, while function body is declared inside $(document).ready()?
thanks for advise
Tomas