Thanks. Are you saying I should remove this line
        $('#slidebar').html($('#hidebar').html());

So I have the following?

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

        function initSlideboxes()
{
$('#slidebar').slideDown("normal");
setTimeout(function()
{
  $('#slidebar').slideUp(3000);


}, 5000);

        $('#slidebartrigger').click(function(){$
('#slidebar').slideToggle(); });

Because the 2 events slideDown & slideUp happen without user action, I
would like to cap frequency so a returning visitor does not have a div
they have already seen that day slide down with out being user
initiated. But if so desired I would like the user to have the ability
to toggle the div as much as they want.

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



- Hide quoted text -
- Show quoted text -


On Oct 26, 7:17 pm, Wizzud <[EMAIL PROTECTED]> wrote:
> Where does frequency come into your script?
> You have a one-off timeout delay, and 2 durations (on the
> animations) ... no frequency.
> I think there may possibly be more script (that's still relevant to
> the question)?
>
> Also, you should avoid setting html() on an element while it's being
> animated.
>
> On Oct 26, 9:56 pm, somnamblst <[EMAIL PROTECTED]> wrote:
>
>
>
> > I just tried the cookie I used with my scriptaculous sliding div & it
> > did not cap frequency. I would like my cookie to cap the frequency of $
> > ('#slidebar').slideDown("normal"); but not prevent a user from using $
> > ('#slidebartrigger').click(function(){$
> > ('#slidebar').slideToggle(); }); to interact with the same div. Is
> > this possible?
>
> >  My JQuery  function
>
> > $(document).ready(function() {
> >         initSlideboxes();
>
> >         function initSlideboxes()
>
> > {
> > $('#slidebar').slideDown("normal");
> > setTimeout(function()
> > {
> >   $('#slidebar').slideUp(3000);
>
> > }, 5000);
>
> >         $('#slidebar').html($('#hidebar').html());
> >         $('#slidebartrigger').click(function(){$
> > ('#slidebar').slideToggle(); });
>
> > };
> > });- Hide quoted text -
>
> - Show quoted text -

Reply via email to