Question: I'm working on a prototype mobile app and having difficulty returning back to the splash screen once the user button presses the Yes button on a modal (on the login page).

This is my code so far:

```
 $("#login_cancel").click(function () {
        $(function () {
            $("#login_canceldialog").dialog({
                resizable: false,
                modal: true,
                buttons: {
                    "Yes": function () {
                        $(this).dialog("close");
                        close_login()
                    },
                        "No": function () {
                        $(this).dialog("close");
                    }
                }
            });
        });
    });

```

jsFiddle here: <http://jsfiddle.net/QaCCH/1/>.

Answer: 
try this to avoid reloading as your own answer has nothing to do with giving the `#splash` a top to down slide 

```
$(document).ready(function () {

$("#splash_logo").hide().fadeIn(1500);

animateSignup()

function animateSignup() {    //new function to animate signUp_btn
    $("#signup_btn").animate({
        "padding-top": "+=100px"
    }, "slow");
}

$("#signup_btn").click(function () {
    close_splash();
    $("#signup").show();
});

$("#login_btn").click(function () {
    close_splash();
    $("#login").show();
});

function close_splash() {
    $("#splash").animate({
        "margin-top": "-=568px"
    }, "slow").hide(1)

//assign initial padding value to signup_btn to again animate when splash reappear
    $('#signup_btn').css('padding-top', '100px'); 
}

function close_login() {

$('#splash').css("margin-top", "0px");  //in case slide from top to down not required

    $('#login').fadeOut("fast", function () {

        $('#splash').fadeIn('fast',function(){

        animateSignup();

        })

    })
}

$("#login").hide();
$("#login_canceldialog").hide();

$("#login_btn").click(function () {
    close_splash();
    $("#login").show();
});

$("#login_cancel").click(function () {
    $(function () {
        $("#login_canceldialog").dialog({
            resizable: false,
            modal: true,
            buttons: {
                "Yes": function () {
                    $(this).dialog("close");

                    close_login();

                },
                    "No": function () {
                    $(this).dialog("close");
                }
            }
        });
    });
});

$("#signup").hide();

});

```

[**DEMO**](http://jsfiddle.net/UD_B/QaCCH/2/)
Used - `location.reload();`

so code became:

```
function close_login() {
    $("#login").animate({
        "margin-top": "-=568px"
    }, "slow").hide(1);
    location.reload();
}

```