JSFiddle - React, Tailwind, and code Playground
by rodrigonery
HTML
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<p id="teste">Teste</p>
CSS
.btn {
margin-top: 5%;
}
JavaScript
// Com event.preventDefault();
/*
$(function () {
$('p').on("click", function (event) {
event.preventDefault();
});
});
*/
/*
// Com o return false;
$(function () {
$('p').on("click", function (event) {
return false;
});
});
*/
// Com o event.stopImmediatePropagation();
$(function () {
$('p').on("click", function (event) {
event.stopImmediatePropagation();
$(this).css({ background-color: "blue"});
});
});