Hi all, i have this function, it slides down a div #dd_about and stays down until i click on the body, is there a way to keep the div down until i move from the div and not click? Im new to jscript and jquery thanks.

Any help is appreciated

<div id="dd_b"><a href="softball.php"><img src="images/nav/softball_btn.png" alt="Softball" width="125" height="25" border="0" id="softball_btn"  onmouseover="chgImg(this.id,1)" onmouseout="chgImg(this.id)" /></a>
              <div id="dd_bout">
                <ul>
                  <li><a href="softball.php#camps">Camps &amp; Clinics</a></li>
                  <li><a href="softball.php#completeplayer">Compleye Player</a></li>
                  <li><a href="softball.php#eliteregional">Elite Regional</a></li>
				  <li><a href="softball.php#lilstars">Lil Stars</a></li>
                  <li><a href="softball.php#training">Training Facility</a></li>
                </ul>
              </div>
            </div>
var timeId;
function blank(){
}
$(document).ready(function(){
	$('#dd_a').mouseover(
		function(){
			$('#dd_about').slideDown(300);
		}
	);
	
	$("body").click(function(){$('#dd_about').slideUp(300);});
});

Recommended Answers

All 3 Replies

$("#dd_a").mouseout(function() { $('#dd_about').slideUp(300); });

// or

  $('#dd_a').hover(
    function() {
      $('#dd_about').slideDown(300);
    },
    function() {
      $('#dd_about').slideUp(300);
    }
  );

Hey Pritaeas, that technically works but... The #dd_about div rolls up when i go to click on the links, is there something i can incorporate into the code to keep the div showing until i roll out from dd_about?

Thanks

$("#dd_about").mouseout(function() { $('#dd_about').slideUp(300); });

Don't know your positioning, so you may have to tweak this example with the previous one.

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.