user3844078
user3844078

Reputation: 1583

javascript hide two element and show only one

Hi all I have this script and i want when I click GE show EN and RU,after click EN then show RU and GE only, I want it's happened Toggle times

   <script>
    $(document).ready(function(){
        $(".content").click(function(){

        });
    });
</script>

<style>
    .lang1{
        display:none;
    }
</style>

</head>

<body>
    <div class="content">GEO</div>
    <div class="lang1">EN</div>
    <div class="lang1">RU</div>
</body>

Upvotes: 4

Views: 139

Answers (2)

Sumanta
Sumanta

Reputation: 313

<body>
    <div class="flip">GEO</div>
    <div class="flip">EN</div>
    <div class="flip">RU</div>
</body>

// In Header section

$(".second").click(function(){
    $(".flip").not(this).Toggle();
    });

Upvotes: 2

Val Do
Val Do

Reputation: 2695

Its so easy

 <body>
        <div class="second">GEO</div>
        <div class="second">EN</div>
        <div class="second">RU</div>
    </body>

    // language panel script 
    <script>
    $(".second").click(function(){
        $(".second").not(this).fadeToggle();
        });
    </script>

Upvotes: 6

Related Questions