0

I'm new to this Area of Javascript and jQuery. Aplogize if this is a Silly Question. Hope you'll understand.

$(document).ready(function(){
    $(".fbbtn").click(function(){
        $(".aboutmeshow").hide(function(){
            $(".regtable").hide(function(){
                $('.dndtable').hide(function(){
                    $(".fbtable").slideToggle();
                });
            });
        });
    });
}); 

Let me Elaborate the Scenario what i tried here.

This is my UI which has 4 button. When clicking on each button it show its <div> element and hides others button <div>. and above javascript code is only for one button which i given. Look at the Screenshots below

User Interface

enter image description here

Click on Feedback Button

enter image description here

Clicking on About me Button hides the feedback button with an effect

enter image description here

Hope this clarifies the Doubt on why am doing this

Jeeva
  • 632
  • 1
  • 12
  • 21
  • It 's not make any sense to doing next job in callback since you hidding elements instantly, without any timeout – Sojtin Jul 20 '16 at 07:34
  • 2
    There is no animation involved, why are you passing the following lines as callbacks? – haim770 Jul 20 '16 at 07:35
  • 1
    Note that the best answer in the duplicate question is the third one: http://stackoverflow.com/a/11354378/519413 – Rory McCrossan Jul 20 '16 at 07:35
  • 1
    $(document).ready(function(){ $(".fbbtn").click(function(){ $('.aboutmeshow, .regtable, .dndtable').hide(); $('.fbtable').slideToggle(); }); }); This should to the same. – DannielR Jul 20 '16 at 07:52
  • Please check the Question Updates Above on why am doing this. thank you for all the response. – Jeeva Jul 20 '16 at 08:27

0 Answers0