Syntax correction - offset()
Hi
Please let me know what is wrong with this code. Is there an error in the offset method syntax?
<!DOCTYPE html>
<html>
<head>
<script>
$(document).ready(function(){
$('button').click(function(){
$('p').offset(top:100,left:0);
});
});
</script>
</head>
<body>
<p>This is a paragraph.</p>
<button>Set offset coordinates of the p element using an object</button>
</body>
</html>
Thanks a lot
Jayashree