So you want the anchor to work, but be delayed till after the slide has
completed?

In that case I'd do something like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
    <head>
        <title>Signin</title>
        <script src="http://code.jquery.com/jquery-latest.js";></script>
        <script src="
http://dev.jquery.com/view/tags/ui/latest/ui/effects.core.js";></script>
        <script src="
http://dev.jquery.com/view/tags/ui/latest/ui/effects.slide.js";></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $('#jform').show('slide', {direction:"down"},1000);
                $('a#signin').click(function() {
                    $(this).parent().hide('slide',
                                          {direction:"down"},
                                          1000,

(function(url){window.location=url})($(this).attr('href'))
                                     );
                    return false;
                });
            });
        </script>
    </head>
    <body>
        <div id="jform">
            <a href="" id="signin">Sign in</a>
        </div>
    </body>
</html>

but there seems to be some sort of timing problem - the callback seems to be
called before the slide is over - at least here in my FF3.1beta1

On Wed, Nov 26, 2008 at 1:55 PM, bruno tapdur <[EMAIL PROTECTED]> wrote:

> hi Christian,
>
> Thx but my problem still remain as i have to navigate between an home page,
> click on signin button, then play the silde down effect, fill the signin
> form and then play the hide effect slide before leaving to the home page.
>
> So as my home page is separate to my login form, my href never be empty and
> the hide effect never play.
>
> Is there a sync function to wait the end of effect before leaving the page
> ?
>
> How to  play a transition between 2 differents html pages ?
>
> Thank for your response.
>
> Regards
> Bruno
>
>
> 2008/11/26 Christian Sonne <[EMAIL PROTECTED]>
>
> That's because an empty (or for that matter, non-empty) href attribute will
>> make the browser go to the page it links to - in the case of an empty href,
>> itself - that measn, it'll reload the page when you click it (after running
>> your onclick)
>>
>> This can be remedied by making the onclick function return false:
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
>> <html xmlns="http://www.w3.org/1999/xhtml";>
>>     <head>
>>         <title>Signin</title>
>>         <script src="http://code.jquery.com/jquery-latest.js";></script>
>>         <script type="text/javascript"
>> src="./Resources/UI/effects.core.js"></script>
>>         <script type="text/javascript"
>> src="./Resources/UI/effects.slide.js"></script>
>>         <script type="text/javascript">
>>             $(document).ready(function() {
>>                 $('#jform').show('slide', {direction:"down"},1000);
>>                 $('a#signin').click(function() {
>>                     $('#jform').hide('slide', {direction:"down"},1000);
>>                     return false;
>>                 });
>>             });
>>         </script>
>>     </head>
>>     <body>
>>         <div id="jform">
>>             <a href="" id="signin">Sign in</a>
>>         </div>
>>     </body>
>> </html>
>>
>>
>>  On Tue, Nov 25, 2008 at 5:49 PM, Bruno75 <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Hi,
>>>
>>> I try to use jquery ui hide effect  slide but it don't work after a
>>> click on <a href="" >sign in</a>
>>> it is ok if you delete the href. here is the code
>>>
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
>>> www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>>> <html xmlns="http://www.w3.org/1999/xhtml";>
>>> <head>
>>>        <title>Signin</title>
>>>        <title>Signin</title>
>>>        <script src="http://code.jquery.com/jquery-latest.js";></script>
>>>        <script type="text/javascript" src="./Resources/UI/
>>> effects.core.js"></script>
>>>    <script type="text/javascript" src="./Resources/UI/
>>> effects.slide.js"></script>
>>>        <script type="text/javascript">
>>>                $(document).ready(function() {
>>>                    $('#jform').show('slide', {direction:"down"},1000);
>>>                $('a#signin').click(function() {
>>>                        $('#jform').hide('slide',
>>> {direction:"down"},1000);
>>>                });
>>>                });
>>>        </script>
>>> </head>
>>>
>>> <body>
>>>
>>>        <div id="jform">
>>>                <a href="" id="signin">Sign in</a>
>>>        </div>
>>>
>>> </body>
>>> </html>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to