Here is the simplified scenario
$(function() {
$('#btn').on('click', function() {
alert('JQuery')
})
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="button" id='btn' value="Button" onclick="alert('onclick');return false;" />
two alerts are called even though I have returned false. How can I prevent script written inside ready event?