title: How to Change Mouse over event to Mouse Click Event in below coding
body: <p>This is JavaScript code for menu's. This script is in the form of  Mouse Over Event, but I need to change it to Mouse Click Event. Please help me to change this one.</p>
  <pre><code>    var dolphintabs={subcontainers:[], last_accessed_tab:null,
  
      revealsubmenu:function(curtabref){
      this.hideallsubs()
      if (this.last_accessed_tab!=null)
          this.last_accessed_tab.className=&quot;&quot;
      if (curtabref.getAttribute(&quot;rel&quot;)) //If there's a sub menu defined for this tab     item, show it
      document.getElementById(curtabref.getAttribute(&quot;rel&quot;)).style.display=&quot;block&quot;
      curtabref.className=&quot;current&quot;
      this.last_accessed_tab=curtabref
      },
  
        hideallsubs:function(){
            for (var i=0; i&lt;this.subcontainers.length; i++)
              document.getElementById(this.subcontainers[i]).style.display=&quot;none&quot;
  },
  
  
       init:function(menuId, selectedIndex){
      var tabItems=document.getElementById(menuId).getElementsByTagName(&quot;a&quot;)
          for (var i=0; i&lt;tabItems.length; i++){
              if (tabItems[i].getAttribute(&quot;rel&quot;))
                         this.subcontainers[this.subcontainers.length]=tabItems[i].getAttribute(&quot;rel&quot;) //store id of submenu div of tab menu item
          if (i==selectedIndex){ //if this tab item should be selected by default
              tabItems[i].className=&quot;current&quot;
              this.revealsubmenu(tabItems[i])
          }
      tabItems[i].onmouseover=function(){
      dolphintabs.revealsubmenu(this)
      }
      } //END FOR LOOP
  }
  
   }
  </code></pre>
  <p>For Sample Please See the below Link.
  <a href="http://www.javascriptkit.com/script/script2/tabset/index.shtml" rel="nofollow noreferrer">Click Here to View the Sample of it</a>
  <a href="http://www.javascriptkit.com/script/script2/tabset/index.shtml" rel="nofollow noreferrer">http://www.javascriptkit.com/script/script2/tabset/index.shtml</a></p>