Question: I have this javascript that calls a function after a 1.5 second timer. In Chrome, it works great. In Firefox, I get a Reference Error: accessTransition is not defined. Any explanation for why this is the case?

```
$('#next-btn').click(function(e) {
    window.setTimeout(accessTransition, 1500);

    function accessTransition()
    {
        $('.fact-intro-1').slideUp(1000);
        $('.fact-text-1').css('display', 'inline-block');
    }
} 

```

Answer: 
Try with:

```
function accessTransition()
    {
        $('.fact-intro-1').slideUp(1000);
        $('.fact-text-1').css('display', 'inline-block');
    }

$('#next-btn').click(function(e) {
    window.setTimeout(accessTransition, 1500);

} 

```

I think timeout cannot get this function because it's nested in event handler function (javascript has function based scope).
```
function accessTransition()
{
    $('.fact-intro-1').slideUp(1000);
    $('.fact-text-1').css('display', 'inline-block');
}

$('#next-btn').click(function(e) {
    window.setTimeout(accessTransition, 1500);
}

```

You should define the function outside the event handler.