Hi there,

I have a page with a div that uses a toggle slideUp/slideDown effect as follows:-


var $jq = jQuery.noConflict();

        $jq(document).ready(function()
        {
        $jq("#recenttoggle").toggle(function()
        {
        $jq("#recent").slideDown('slow');
        }
        , function()
        {
        $jq("#recent").slideUp('fast');
        }
        );
        
});

This works fine, aside from the fact that the default state for the recent div is 'show' - ie, after the page has loaded, the recenttoggle div/link has to be clicked twice to hide it/slideUp.

So that's my first question - how do I make it so that the recent div hides/slideUp when the recenttoggle div/link is clicked the first time?

Also, how can I reference this toggle function from another JS function?
What I want to do is call a function that will hide/slideUp the recent div, update the recent div using an AJAX call, and then show/ slideDown.

Any help greatly appreciated.

Thanks.

Reply via email to