Skip to content
Loading
<%} %>
  • H/W Components
  • ECU
  • Motor
  • Pressure Sensor
  • Test Block
  • Drawing
  • Buffer Box
  • EMC Load Box
  • EMC Hardware
  • Tester Equipment
  • <%--Formerly it is Suitcase tester--%>
  • Suitcase Computer
  • PCBA
  • Assemblies
  • Test Block Assembly
  • <%--
  • EHCU Test Assembly
  • --%>
  • Release
  • EMC Test Setup
  • S/W Assembly
  • Suggestions
  • Lab Tracking
  • In button click written like below
    $('#SearchBtn').click(function () {
    $('ul.classname > li').hide();
    $('ul.classname > li#HWComponents').show();
    });
    By defaultHWComponents
  • items are opened.Then when clicking on search button all the other list items are getting collapsed and then those are hided.
  • Please provide the solution for this.
    +1
  • Midhun Tp
    +1
    Hi,
    Just change click function as below -
    $('#SearchBtn').click(function () {
    $('ul#list1> li').hide();
    $('ul#list1> li#HWComponents').show();
    });
    +1
  • +1
    Hi Midhun,
    Thanks for your response.As we have to put the id of each list dynamically can you please let me know how to use the id of the selected
  • and also some times the page gets refreshing and it is expanding all the menu items once in a while and then closing.Is there any specific static property to set in the html script?
  • +1
  • Midhun Tp
    0
    Hi,
    Please try below code -
    On your button click function, write
    $('ul.classname > li').hide();
    $('ul.classname > li#particularli_id').show();
    If it doesn't solves your issue, please provide the code which you are using for the same.
    0
  • Midhun Tp
    0
    Hi,
    By default you have to add style="display:none" for all li's and on document.ready make particular li show using below script.
    $(function(){
    $('li#particularid').show();
    });
    And regarding getting id of selected li, i don't know where is your button and what is happening when it is clicked? You may need something to identify which li to be shown. How are you making the li selection?
    0
  • Vinay Singh
    0
    Hi
    check the link
    http://jqueryui.com/accordion/
    http://www.aspdotnet-pools.com/2016/02/jquery-accordion-menu-with-sortable.html
    0