stopImmediatePropagation

example for article on http://stepansuvorov.com/blog

by Stepan Suvorov

HTML

<a href="js4.it">Link</a>

CSS

.yellow{
background: yellow;
}

JavaScript

$('a').click(function(event){
	event.preventDefault();
	console.log('Click on the link one time.');
});
$('a').click(function(event){
	event.preventDefault();
	event.stopImmediatePropagation();
	console.log('Click on the link two time.');
});
$('a').click(function(event){
	event.preventDefault();
	console.log('Click on the link three time.');
});
$('a').click(function(event){
	event.preventDefault();
	console.log('Click on the link four time.');
});