$('div').click(function() {
$(this).toggleClass('myClass');
});
$('div').click(function() {
var color = $(this).css('background-color');
});
$('img').click(function() {
var img = $(this).attr('src');
});
$('img').mouseover(function() {
$(this).attr('src', 'image-1.png');
});
$('img').mouseoout(function() {
$(this).attr('src', 'image-2.png');
});
$('img').hover(function() {
$(this).attr('src', 'image-1.png');
}, function() {
$(this).attr('src', 'image-2.png');
});
$(document).click(function(e) {
var x = e.pageX;
var y = e.pageY;
});
$(document).mousemove(function(e) {
var x = e.screenX;
var y = e.screenY;
});
$(document).keypress(function(e) {
var key = String.fromCharCode(e.which);
});
$('div.container').on('click', 'li.nav', function() {
console.log('clicked');
});