I am not able to click the button directly. I want to automate a condition like this in jQuery. The condition is, if I am not able to click the button manually - for example if it is behind something, don't click the button in automation.
$(document).ready(function () {
    setTimeout(function () {
        $("input").click()
    }, 1000)
})div {
    position:fixed;
    height:100px;
    width:100px;
    background:transparent;
    z-index:10;
    border:solid 1px;
    top:0px;
    left:0px;
}<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input type="button" onclick="alert()">
<div></div> 
    