Created
January 26, 2013 19:32
-
-
Save pafnuty/4644023 to your computer and use it in GitHub Desktop.
Ртололо
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Трололо</title> | |
<style> | |
body { | |
width: 720px; | |
margin: 0 auto; | |
padding: 50px 0; | |
} | |
.elem { | |
display: inline-block; | |
padding: 5px; | |
border: solid 1px #ccc; | |
margin: 0 5px 5px 0; | |
cursor: pointer; | |
} | |
</style> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> | |
<script> | |
jQuery(document).ready(function($) { | |
console.log('готово'); | |
$('body').on('click', '.elem:last', function () { | |
// $(this).after('<span class="elem">клик</span>'); | |
setTimeout($(this).after('<span class="elem">клик</span>') $(this).next().trigger('click'), 1000); | |
console.log('клик'); | |
}) | |
}); | |
</script> | |
</head> | |
<body> | |
<span class="elem">клик</span> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment