I have set of divs as listed below,
<div id="invoice"></div>
<div id="claim"></div>
<div id="draft"></div>
and i have a reponse which may have type as invoice, claim or draft. If I get "draft" in the response then I will display only claim div and rest two will be hidden, but the problem is the above two divs are hidden and occupying space also (i.e., leaving a gap from the top and then displaying the draft div).
I am using CSS as below,
$("#draft").css('flex','flex-wrap'); // for showing the content in a straight line.
$("#draft").css('display','block');
and for hiding it,
$("#draft").css('display','none');
Similarly for all the id. I am new to this, so please correct me if I am wrong somewhere. Thanks in advance.