Hello, If you want the div to scroll up when you move the mouse over a
sertain div you could use the hover() function but here is a quick
example of mouse events

$(function(){
//first hide the button div
        $('div#buttonDiv').hide();
        //here set a hover to show roll on and roll off and while on access
button div and slideDown and roll off slideUp() taking 4 seconds for
both
        $("div#textDiv").mouseover(
                function () {
                        $("div#buttonDiv").slideDown(2000);
                });
        $("div#textDiv").mouseout(
                function () {
                        $("div#buttonDiv").slideUp(2000);
                });
});
</script>
<style type="text/css">
#container {border:1px solid #FF0000;}
#textDiv {color:#006600; border:#999900 2px solid;}
#textDiv h1 {font-weight:bold; color:#656565;}
#textDiv p {padding:0;}
#buttonDiv {padding:10px 0 0 0; background-color:#99CC00}
</style>
</head>

<body>
<div id="container">
  <div id="textDiv">
    <h1>My DIV</h1>
    <p>When user rolls over this div show button</p>
  </div>
  <div id="buttonDiv">
    <input type="button" value="MyButton"/>
  </div>
</div>

I didnt check it out but if it dosnt work well you get the idea

On Apr 30, 2:34 pm, Waters <[EMAIL PROTECTED]> wrote:
> Hi all - new to jQuery -  a case of trying to run before I walk for
> sure...
>
> But.. can anyone help with this?
>
> I have a container div - and two nested divs: one for text, and
> another with button (will become part of a resultset)
>
> I'd like the button div to show with the slideUp and slideDown
> functions when the mouse is over the containing div.
>
> The trouble I'm having is handling the mousout events - and keeping
> the button containing div visible if they move over into this div.
>
> The source is short, and can be viewed at...
>
> http://www.dotbits.com/reveal_buttons.html
>
> Any suggestions greatly appreciated...

Reply via email to