Question: I have hamburger and menu on the left side, which has `width: 0px;`

How can I do after click on hamburger menu changes width to `250px`, and second click change width to `0px`?

```
var hamburger = $('.hamburger-menu__list').css('width');

$('.hamburger-toggle').click(function(){
    $(this).toggleClass('open');
    if (hamburger == '0' ) {
        $('.hamburger-menu__list').css('width', 250);
    } 
    else {
        $('.hamburger-menu__list').css('width', 0);
    };
});

```

Answer: 
This will work. You have to check hamburger width everytime.

```
$('.hamburger-toggle').click(function(){
    var hamburger = $('.hamburger-menu__list').css('width');
    $(this).toggleClass('open');
    if (hamburger == '0' ) {
        $('.hamburger-menu__list').css('width', 250);
    } 
    else {
        $('.hamburger-menu__list').css('width', 0);
    };
});

```
You need to check the width every time you click on the button, also you need to parseInt the width to get a right number, `css('width')` returns the value with prefix `px` e.g `250px` so parseInt will remove the prefix and returns pure number, Try this:

```
$('.hamburger-toggle').click(function(){
    var hamburgerWidth = parseInt($('.hamburger-menu__list').css('width'));

    $(this).toggleClass('open');

    if (hamburgerWidth === 0) {
        $('.hamburger-menu__list').css('width', 250);
    }  else {
        $('.hamburger-menu__list').css('width', 0);
    };
});

```