Your issue is that you're not passing on the event
object to the function.
It works in IE and chrome because they define a window.event
. Firefox does not.
$(document).ready(function(){
$("#menu_button").click(function(event){
show(event);
});
$("#exit").click(function(event){
hide(event);
});
});
and then define the first parameter to each function to receive the event
object.
function show(event) {
// ...
}
function hide(event) {
// ...
}
And FYI, you could do this instead:
$(document).ready(function(){
$("#menu_button").click(show);
$("#exit").click(hide);
});
Now this
will be your element, and the first parameter will receive event
.