jQuery Simple Example
by sramnan
HTML
<script src="//www.addressfinder.co.nz/assets/v2/widget.js"></script>
<div class="test">
<label for="search_field" class="new">Address</label>
<input type='text' class='address_field' />
</div>
CSS
body {
padding: 5px;
}
label {
font-weight: bold;
}
input[type=text] {
width: 20em
}
p {
margin: 1em 0 0;
}
JavaScript
$("label").click(function(e){
console.log(e.target);
});
$("input").on("click",function(e){
console.log(e.target);
});
$("label").bind("click",function(e){
console.log(e.target);
})