Bhojendra Rauniyar
Bhojendra Rauniyar

Reputation: 85575

toggling both buttons in fixed positioned at bottom

I have applied jQuery to a fixed positioned div as this

jQuery(document).ready(function(){
    jQuery(".buttontab a").click(function(){

        jQuery(".buttontab a.active").removeClass("active");
        jQuery(this).addClass("active").blur();
        jQuery(jQuery(this).attr("href")).slideToggle(1000);
        return false;
});
});

If the main div was not fixed at bottom it won't have problem but stacking in fixed position the jQuery is working as if both button has been called. Here is the demo from which you can understand properly.

demo

How to stack one button at bottom while other button is opened?

Upvotes: 1

Views: 86

Answers (2)

ManMohan Vyas
ManMohan Vyas

Reputation: 4062

http://jsfiddle.net/MWTVL/

check the link

jQuery(document).ready(function(){
    jQuery(".buttontab a").click(function(){

        jQuery(".buttontab a").removeClass("active");
        jQuery(this).addClass("active").blur();
        jQuery(jQuery(this).attr("href")).slideToggle(1000);
        return false;
});
});

Upvotes: 0

omma2289
omma2289

Reputation: 54629

Check this http://jsfiddle.net/TEn3w/4/

I used display:inline-block; instead of float to apply vertical-align:bottom on the buttons, plus I removed the margins from the h4

.buttons {
    display: inline-block;
    vertical-align: bottom;
}
.buttontab {
    margin: 0;
}

Upvotes: 2

Related Questions