Reputation: 85575
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.
How to stack one button at bottom while other button is opened?
Upvotes: 1
Views: 86
Reputation: 4062
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
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