我的小提琴链接如下链接
此链接应该像点击时切换一样。请帮助解决enter code here
答案 0 :(得分:0)
你不能在一个html元素(标签)上使用两个或多个ID(s)
..为什么你不能这样阅读link
所以最后你的代码:
<div class="cart_clas" >
<div id="showAll">
<a href="#">Click here</a>
</div>
<!-- menu !-->
<div class="filter-panel1" id="menu_rewards" style="display:none; ">
<div class="row" style="float:right;">
<div class="Shop_by">Shop by Categories</div>
<div class="hotel_menu">Deals & Offers</div>
<div class="hotel_menu">Mobile, Tablets & Accessories</div>
<div class="hotel_menu">Laptops & Peripherals</div>
<div class="hotel_menu">Men Fashion</div>
<div class="hotel_menu">Women Fashion</div>
<div class="hotel_menu">Home Decor & Kitchen</div>
<div class="hotel_menu">Personal & Health Devices</div>
<div class="hotel_menu">Home And Kitchen Appliances</div>
<div class="hotel_menu">Tv & Entertainment Devices</div>
<div class="hotel_menu">Camera, Dslrs & Accessories</div>
<div class="hotel_menu">Coupons & Discounts</div>
<div class="hotel_menu">Baby & Kids</div>
<div class="hotel_menu">Beauty & Health</div>
<div class="hotel_menu">Stationery & Office Supplies</div>
<div class="hotel_menu">Sports & Fitness</div>
<div class="hotel_menu">Car & Bike Accessories</div>
<div class="hotel_menu">Gifts & Hobbies </div>
</div>
</div>
<!-- menu !-->
</div>
和 Jquery :
$(function() {
$('#showAll').click(function(){ //Adds click event listener
$('#menu_rewards').show(); // Toggles visibility.
});
});