
I am trying to call a function on image click.It won't work for the first time but,after reloading the page it works fine.please help me out to overcome the issue

I am trying to call a function on image click.It won't work for the first time but,after reloading the page it works fine.please help me out to overcome the issue