Javascript Question

Below is a screen shot of a full width drop menu (Dolphin 7.1) .  What I would like to do, is give the user another way to close the menu other than mousing off the ul. ....  <ul class="sub main_elements">

The ul has a class name, but I could give it an id if necessary.  What I need, is to place a image or text "Menu Close" link on the menu, so that clicking on this image or text will close the menu without mousing off ul .sub .main_elements.  Anybody have any ideas on how to do this with javascript?

DropMenuFW.png · 107.5K · 549 views
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 22 Nov 2012

Thanks for all the help everyone :)

I gave this a try, and it worked.  Problem solved.

 

 

<script>
$(document).ready(function(){
  $("button").click(function(){
    $("ul").addClass("ulClose");
  });
});
$(document).ready(function(){
  $("button").mouseout(function(){
    $("ul").removeClass("ulClose");
  });
});
</script>
<style>
.ulClose {
display:none !important;
}

.menuClose {
background: #101010;
border:1px solid #333333;
padding:4px;
border-radius:4px;
color:#00aa00;
text-transform:none;
}

.menuClose:hover {
background: #151515;
color:#cc0000;
cursor:pointer;
}
</style>

 

 

 

MenuClose.png · 113K · 497 views
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 22 Nov 2012

We are glad to help :P

so much to do....
Quote · 23 Nov 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.