javascript - How to Hide HTML list with jQuery and rise the following inputs? -
hi guys html code :
<ul id="var_language_short"> <li id="languages_more"><label class="form_present_trigger">more</label></li> </ul> <div id="language_checkbox" class="popup_fullscreen"> <div class="popup_fullscreen_close">close</div> <ul id="var_language_long"> </ul> </div> <div class="form_present_row"> <span class="form_present_title"> <label class="form_present_title_label" for="var_prixplat">prix moyen d'un plat<span class="req" title="required">*</span></label> </span> <div class="form_present_content"> <span class="form_present_update"> <input class="form_present_input var_prixplat" type="text" id="var_prixplat" /> </span> </div> </div>
...
jquery code:
var list_tyepe_restaurant = document.getelementbyid('itype') .contentwindow.document.body.innerhtml; $("#var_language_long").html(list_tyepe_restaurant); $("#languages_more").click(function (e) { $("#language_checkbox").css("visibility", "visible"); $("#language_checkbox").css("opacity", "1"); }); $(".popup_fullscreen_close").click(function (e) { $("#language_checkbox").css("opacity", "0"); $("#language_checkbox").css("visibility", "hidden"); });
i can show , hide list problem when hide there blank space , following inputs don't rise. pleade
use .hide()
not visibilty
. hide removes space taken visibilty doesnt.
$("#languages_more").click(function (e) { $("#language_checkbox").show() }); $(".popup_fullscreen_close").click(function (e) { $("#language_checkbox").hide(); });
for reason want use visibilty
set height 0
$("#languages_more").click(function (e) { $("#language_checkbox").css({"visibility" :"visible","height":"auto","opacity":"1"}); }); $(".popup_fullscreen_close").click(function (e) { $("#language_checkbox").css({"visibility" :"hidden", "height":"0","opacity":"0"}); });
Comments
Post a Comment