Shaun DL Shaun DL - 7 months ago 10
HTML Question

Change Div height jQuery

I'm trying to change the style of my div from

<div id="map" style="height:25%;"></div>


to

<div id="map" style="height:0%;"></div>


On a click

jQuery

$('hideMap').css({"height":"0%"});




  • <li><a name="hideMap" class="btn red"><i class="material-icons" style="color:white;">notifications_active</i></a></li></li>


    Thanks in advance if you can assist :)

  • Answer

    $('hideMap').css({"height":"0%"});

    do u want change the height of map div then you can write below code

    $('#map').css({"height":"0%"});

    below is the working fiddle

    https://jsfiddle.net/7cfcfrnr/