Created
March 31, 2016 11:13
-
-
Save lajosbencz/edafb0949aeb1aaaf98cb176f9893299 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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script> | |
<script> | |
$(function(){ | |
$('#add_default').click(function(){ | |
$('#list').append($('<li><a>Default</a></li>')); | |
}); | |
$('#add_clickable').click(function(){ | |
$('#list').append($('<li><a class="clickme">Clickable</a></li>')); | |
}); | |
}); | |
</script> | |
<script> | |
// @todo change any a.clickme background color to red when clicked | |
</script> | |
</head> | |
<body> | |
<button id="add_default">Add default</button> | |
<button id="add_clickable">Add clickable</button> | |
<ul id="list"> | |
<li><a>Default</a></li> | |
<li><a class="clickme">Clickable</a></li> | |
</ul> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment