The click event is bound upon DOM ready state. If you change the DOM thereafter by adding new elements, these will not have the click event bound to them.
You can either, rebind the click event (a little pointless), or you could use the on function.
$(document)
.on({click: function(event) {
console.log($(this).val());
alert($(this).val());
}}, '#option1')
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12