<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.10.1.js'></script>
<script type='text/javascript'>
$(window).load(function(){
$(document).ready(function(){
$('#sample').click(function() {
console.log('yo yo yo .....you good to go.!!!');
});
$('#sample').trigger('click');
});
});
</script>
</head>
<body>
<a href="#" id="sample">this is a link</a>
</body>
</html>