I have a custom select. By clicking, the jQuery library generates an issuing list. Everything works well, just want to know how to hide the block by which one was clicked?

<div class="strip_bg "> <div class="strip_bg_grad"> <form action=""> <select name="dropdown_of_mine" id="demo-select_1" > <option value="1" data-modifier="mod" class="hide" selected >ГГГГ</option> <option value="2">1999</option> <option value="4">2000</option> <option value="5">2001</option> </select> </form> </div> </div> 

The script generates a new list extracting the option so that while the option is not chosen YYYY is displayed twice, and it must be removed, hidden.

  • can you have a class .hide not declared? Because Initially, your field should not be visible - Vasily Barbashev
  • option - special blocks, in my opinion they do not obey styles, it is possible to hide from under js, intercepting a droplist event or something like that. - nick_n_a
  • you need to see all the code - what you have in js and what's in html, it is desirable to put it completely in the snippet, and additionally on codepen - user33274

0