I have a div that produce search results on clicking search button. This is the view
我有一个div,点击搜索按钮产生搜索结果。这是观点
and this is html div of it
这是它的html div
<div class="bestil-menu__btn">
<a onclick="Searchcontrol(1)" class="btn btn_blue">Ændre datoeeller antal personer</a>
</div>
When I press the blue button
当我按下蓝色按钮
<div class="dins-searhc-luk" @Html.Raw(view2)>
<a id="btnclose" class="dinS-bluebuttonC" href="javascript:;">Luk</a>
</div>
it opens the search control and perform searches. I want to close it on pressing Luk anchor in below div to come as it was before. Please help me how to implement it into it. Thank you.
它会打开搜索控件并执行搜索。我想在下面的div中按下Luk锚点关闭它,就像之前一样。请帮我如何实现它。谢谢。
1 个解决方案
#1
0
You can try something like
你可以尝试类似的东西
$('#btnclose').on('click', function(){
$(this).parent('div.dins-searhc-luk').hide();
});
#1
0
You can try something like
你可以尝试类似的东西
$('#btnclose').on('click', function(){
$(this).parent('div.dins-searhc-luk').hide();
});