Skip to content

Instantly share code, notes, and snippets.

@alxfv
Created July 8, 2014 10:00
Show Gist options
  • Save alxfv/f940246e71a6a091d17f to your computer and use it in GitHub Desktop.
Save alxfv/f940246e71a6a091d17f to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>-->
<script src="http://www.km.ru/misc/jquery.js"></script>
<script>
$(function() {
function clickButton() {
$('.result-button').click(function() {
console.log('result clicked');
});
}
$('.main-button').click(function() {
$('.result').html('<p>result has beed overwrite</p><input type="button" class="result-button" value="result button" />');
clickButton();
});
clickButton();
})
</script>
</head>
<body>
<div class="content">
<input type="button" class="main-button" value="main button" />
<div class="result">
result
<input type="button" class="result-button" value="result button" />
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment