document.getElementById('foo').addEventListener('click', callback);
$("#foo").on('click', callback);
Let's read a little
Downloading vs CDN
,
$
jQuery
and lots of other selectors...
$('.class')
$('#id')
$('tag')
$(element).on()
$(document).ready()
$(element).click()
element.addEventListener()
=
document.addEventListener( 'DOMContentReady', func)
element.addEventListener( 'click', func)
By Dize Hacioglu