I need to hide the form on submit

```
<form id="details_form" class="form-horizontal" role="form">

```

and show the game "pacman" 

```
<div id="pacman"></div>

```

I'm using style.display property to hide and show the div and the form

```
$(document).ready(function() {

_("pacman").style.display = "none";

$("form").submit(function(e) {
    _("details_form").style.display = "none";
    if(_("details_form").style.display === "none"){
        _("pacman").style.display = "block";
    }
    return false; // prevents page refresh! :) yay!!
});
});

```

On Chrome and IE:
[![it doesn't work!](https://i.stack.imgur.com/fm3rl.jpg)](https://i.stack.imgur.com/fm3rl.jpg)

but, on Firefox:
[![works as expected](https://i.stack.imgur.com/eVS9Q.jpg)](https://i.stack.imgur.com/eVS9Q.jpg)

I've also hosted it on a server and checked. But with the same result. What's happening? Check my code on [Github](http://github.com/srichakradhar/Quiz-with-Pacman)