Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
var buttonclick = {
label : 'you have ',
onClick: function(){ $(".div1").text(this.label + 'clicked!'); },
onClick1: function(){ alert(this.label + 'clicked!'); }
};
_.bindAll(buttonclick, 'onClick', 'onClick1');
$('#underscore_button').on('click', buttonclick.onClick);
});
</script>
</head>
<body>
<button id="underscore_button">click</button>
<hr>
<div>Result:</div>
<hr>
<div class="div1"></div>
</body>
</html>
The most helpful BACKBONE.JS solutions
How to get country from client ip address using backbonejs ?BACKBONE.JS Click to see more ... 942 84