Maris
Maris

Reputation: 91

How do I remove the fadeOut function?

I have this part of a code, but I want to remove the .fadeOut function. How do I do this? Because replacing it with a .hide() doesn't do the trick.

        function showMessage(status,data){
            if(status === "connected"){
                section.children().css('display', 'none');
                onConnect.show();
            } else if(status === "inviteSomebody"){
                // Set the invite link content
                $("#link").text(window.location.href);
                onConnect.fadeOut(1200, function(){
                    inviteSomebody.show();
                });
            } 
        }

Upvotes: 0

Views: 32

Answers (1)

Deepak Biswal
Deepak Biswal

Reputation: 4320

You can do it like below:

       function showMessage(status,data){
            if(status === "connected"){
                section.children().css('display', 'none');
                onConnect.show();
            } else if(status === "inviteSomebody"){
                // Set the invite link content
                $("#link").text(window.location.href);
                onConnect.hide();
                inviteSomebody.show();
            } 
        }

Upvotes: 2

Related Questions