Is it possible to make a function available after the DOM is ready only? For example something like this
$(document).ready(function(){
function open(obj)
{
}
});
<a href="#" onclick="open(this);">test</a>
If I do that clicking on a doesn’t do anything at all, and if I have the function without the document.ready, when user clicks on the link while the page is loading, it doesn’t display properly.
Thank you
I think open is reserved, but this works for me: