Is it possible to link jQuery menu to tabs?

For example if the user selects "By Filter" in the menu below I want it to open up the Search By Filters tab. How can I achieve this?

JS

$("#menu").menu();
$("#search").tabs();

HTML

<ul id="menu" style="border: 0px; background:none">
<li><a id="2" style="cursor: pointer">Search</a>
<ul style="z-index: 2">
<li><a id="2a" style="cursor: pointer">By Filter</a></li>
<li><a id="2b" style="cursor: pointer">By Room</a>    
</li>
</ul>
</li>
</ul>

<div id="search" style="z-index: 1;">
  <ul>
    <li><a href="#search-1">Search By Filters</a></li>
    <li><a href="#search-2">Search By Room</a></li>
  </ul>
  <div id="search-1">
  </div>
  <div id="search-2">
  </div>
</div>  
Member Avatar for LastMitch

@jeansymolanza

Is it possible to link jQuery menu to tabs?

The issue you are having has nothing to do with PHP instead it should be in the Javascript section.

But to answer your question. Yes you can.

Read this and try the example (once you understand it then you can modify it to suited your needs):

http://www.jacklmoore.com/notes/jquery-tabs

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.