Thanks Glen,

I have the following

$(document).ready(function() {
        initSlideboxes();

        function initSlideboxes()

{
$('#slidebar').slideDown("slow");
setTimeout(function()
{
  $('#slidebar').slideUp("slow");

}, 7000);


        $('#slidebar').html($('#hidebar').html());
        $('#slidebartrigger').click(function(){$('#slidebar').toggle(); });

};

});

And I don't seem to be encountering the problem I had with
scriptaculous. The slideDown & slideUp occur without user initiated
click events

With scriptaculous if the user used the slidebar trigger to close
before the setTimeout event occured my div would pop back open

In addition jquery does not flicker with Flash content like
scriptaculous does if the slide is too fast & jquery doesn't need the
Flash activex control IE workaround.

The real issue that killed my scriptaculous widget was that it didn't
work at all in IE when being served via a 3rd party javascript
include. That jquery worked under these conditions has me ecstatic!

On Oct 4, 7:37 am, motob <[EMAIL PROTECTED]> wrote:
> You could also try using setTimeout() like so:
>
> setTimeout(function()
> {
>   $('#slidebar').toggle();
>
> }, 2000);
>
> This will activate the #slidebar toggle after 2000 milliseconds even
> is the user is trying to interact with the #slidebar which may not be
> what you want. I'm not sure what the slide bar is being used for but
> if you wanted a more robust closing solution then you may want to make
> use of timers to detect when the user is not using, or interacting
> with #slidebar.
>
> The following bit of code will detect when the user's mouse is no
> longer interacting with #slidebar and close it after 2000
> milliseconds.
>
> $('#slidebartrigger').click(function(){
>     $('#slidebar').toggle().hover(function(){
>         //mouseover
>         clearTimeout(closetimer);
>     }, function(){
>         //mouseout
>         closetimer = window.setTimeout(function(){
>             $('#slidebar').hide();
>         }, 2000);
>     });
>
> });
>
> If the mouse cursor moves off of #slidebar then a timer is created
> that will fire the $('#slidebar').hide() function after 2000
> milliseconds. If the cursor moves back over the #slidebar (hovers)
> then the timer is cleared and #slidebar will not close. This code
> isn't tested so you might need to tweak it a bit. I am using something
> similar on my project and it works great.
>
> On Oct 3, 7:21 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
>
>
>
> > There is a pause plugin.  Does that do the 
> > trick?http://blog.mythin.net/projects/jquery.php
>
> > Glen
>
> > On 10/3/07, somnamblst <[EMAIL PROTECTED]> wrote:
>
> > > I currently have this
>
> > > $(document).ready(function() {
> > >         initSlideboxes();
> > >         function initSlideboxes()
> > > {
> > > $('#slidebar').show();
> > >         $('#slidebar').html($('#hidebar').html());
> > >         $('#slidebartrigger').click(function(){$('#slidebar').toggle();
> > > });
>
> > > };
> > > });
>
> > > I would like after a certain duration of several seconds to have the
> > > slidebar div hide. I know how to do this in scriptaculous but I have
> > > abandoned my scriptaculous solution for jquery.- Hide quoted text -
>
> - Show quoted text -

Reply via email to