Question: Table is given as

```
Food ID  | Food Review
1        | good Review
1        | good Review
1        | Bad Review
2        | good Review
2        | Bad Review
3        | Good Review

```

and the Output expected is

```
Food ID   | Good Review | All Review | Acceptance score
1         | 2           | 3          | 2/3

```

Acceptance score will be calculated as good Review/All Review

Can anyone please help me with the query ?

Answer: 
Instead of setting the style in each click, [toggle](http://api.jquery.com/toggleclass/) the class `$( "#toogle_menu" ).toggleClass( "toggled" )` and style this class in css

```js
$("#toogle_menu").click(function() {
  $("#jy_nav_pos_main").slideToggle("slow"),
    $("#toogle_menu").toggleClass("toggled")
});
```

```css
.toggled {
  transform: rotate(-90deg);
}
```

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul class="nav nav-tabs row margin_auto" id="jy_nav_pos_main" role="tablist">
  ......
</ul>
<button id="toogle_menu" class="btn btn-light">
&raquo;
</button>
```
try this...

```
<style type="text/css">
    .nav{
        display: none;
    }
    .rotate{
        transform: rotate(90deg);
        -webkit-transform:rotate(90deg);
        -moz-transform:rotate(90deg);
        -o-transform:rotate(90deg);
        -ms-transform:rotate(90deg);
        transition: all 0.4s linear;
    }
    #clickBtn span{
        transition: all 0.4s linear;
    }
</style>
<button type="button" id="clickBtn">Click &nbsp;&nbsp;&nbsp;<span class="fa fa-angle-right"></span></button>
<ul class="nav nav-tabs row margin_auto" id="jy_nav_pos_main" role="tablist">
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
    <li>Item 4</li>
    <li>Item 5</li>
</ul>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("#clickBtn").on('click',function(){
            $(this).find('span').toggleClass('rotate');
            $(".nav").slideToggle();
        });
    });
</script>

```