Javascript – JQuery hide div – resulting in javascript error


I have the following html in page:

<script src="jquery-1.3.2.min.js" type="text/javascript"></script>    
        function hideIt() {
            return true;
<div onclick="hideIt();">
         hello world

When I click on the div, it results in the following JavaScript error:

Line: 53
Error: 'this[…].style' is null or not an object

Any solutions?

Best Solution

This should fix it

<div onclick="hideIt(this);">


function hideIt(o) {
            return true;