I am trying to change all my .live()
to .on()
as the prior is now deprecated.
I am struggling to understand how it works though. Before I used this code and it worked fine...
$('#lightBoxClose').live('click', function() {
$('#lightBox').fadeOut();
});
So I tried changing it to,
$('#lightBoxClose').on('click', function() {
$('#lightBox').fadeOut();
});
But it doesn't work can anyone please explain what I am supposed to be doing thanks.