siva shanker siva shanker - 1 year ago 75
jQuery Question

clicking on the link not opening the menu

  • I am trying to open the menu items on clicking on click here link.

  • My fiddle link is as below link

    link is here

  • This link should work like toggle on clicking. Please help with this
    enter code here

Answer Source

You can't use two or multiple ID(s) on one html element(tag)..why you can not do this read on this link

so finally your code:

<div class="cart_clas" >
 <div id="showAll">

   <a href="#">Click here</a>
   <!-- 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>
   <!-- menu !-->

and Jquery:

$(function() {
 $('#showAll').click(function(){  //Adds click event listener  
    $('#menu_rewards').show(); // Toggles visibility.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download