Javascript hide two elements and show only one

Hi everyone, I have this script, and I want when I press GE show EN and RU after pressing EN, then only RU and GE will be shown. I want this to happen. Switch time

   <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>
+4
source share
2 answers

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>
+6
source
<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();
    });
+2
source

All Articles