I have a div in the center of the page. I have the background-image in the body. I need to do using jquery click only on the background-image. If you click the div with id divPage, nothing happens.
Thanks for the advice or possibly another solution.
HTML:
<body>
<form id="formBackground" method="post">
<div id="divPage">
Text.
</div>
</form>
</body>
CSS
body{
padding: 0px;
margin: 0px;
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 12px;
color: white;
background-image: url('../images/backgrounds/bg.jpg');
background-repeat:no-repeat;
background-position:top;}
div#divPage{
width: 800px;
height: 300px;
margin: auto;}
I tried this, but it does not work correctly:
$('body').click(function() {
alert("Click");
})
It was click on the div with id id divPage.