I'm not initially developper but for my portfolio I need to dive again in the incredible world of jQuery !
I wanted to optimize my code and create functions because I call it a lot of times, but for a reason I don't know, this code isn't working, let's see a part of it :
$( document ).ready(function() {
function openMenu(){
alert('ok');
}
$('.home-left').click(openMenu());
This code would normally work, but it is only working on DOM load, and not after. If I place it outside, it isn't working at all.
Maybe I do something wrong ?
Thank you !