Skip to content

Instantly share code, notes, and snippets.

@linuxonrails
Created April 26, 2018 06:42
Show Gist options
  • Save linuxonrails/968d3145f0c46d04d100a11c20e82143 to your computer and use it in GitHub Desktop.
Save linuxonrails/968d3145f0c46d04d100a11c20e82143 to your computer and use it in GitHub Desktop.
// source http://jsbin.com
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<span class="act-as-link" href="/app/quienes-somos">********FOO LINK********</span>
<br /><br /><br /><br />
<a class="act-as-link" href="/app/quienes-somos">********REAL LINK********</a>
<style>
.act-as-link:active, .act-as-link:focus, .act-as-link:hover,
.as-link:active,
.as-link:focus,
.as-link:hover {
cursor: pointer;
color: #09485e;
text-decoration: underline; }
}
</style>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script>
alert("prueba1");
$(document).on('click', '.act-as-link', function(e) {
alert("funciona0");
$('body').css('color', 'red');
alert("funciona1");
window.location.href = $(e.currentTarget).attr('href');
alert("funciona2");
});
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<span class="act-as-link" href="/app/quienes-somos">********FOO LINK********</span>
<br /><br /><br /><br />
<a class="act-as-link" href="/app/quienes-somos">********REAL LINK********</a>
<style>
.act-as-link:active, .act-as-link:focus, .act-as-link:hover,
.as-link:active,
.as-link:focus,
.as-link:hover {
cursor: pointer;
color: #09485e;
text-decoration: underline; }
}
</style>
<script src="https://code.jquery.com/jquery-1.12.4.js"><\/script>
<script>
alert("prueba1");
$(document).on('click', '.act-as-link', function(e) {
alert("funciona0");
$('body').css('color', 'red');
alert("funciona1");
window.location.href = $(e.currentTarget).attr('href');
alert("funciona2");
});
<\/script>
</body>
</html>
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment