Positioning expanding collapsing box from table cell with jquery
My question is, if anyone knows how to achieve the effect of creating slides from a table table, without the whole table expanding.
Too slide the slide from the location of that particular line on top of the table, so say
otherwise it looks ugly as you can see from my page (click on the first row) I put the div inside the cell there
I think I also found a position from the table and put it on top, but I don't know how to do it yet.
this is the code i used for the slide:
$(".reg_info_body").hide();
$(".reg_info").toggle(function(){
$(this).children(".reg_info_body").slideDown(100);
}, function(){
$(this).children(".reg_info_body").slideUp(300);
});
thanks richard
0
Richard
a source
to share
2 answers
just add this to your style for div:
position: fixed; width: 400px;
.reg_info_body {
background-color:#F4F4F8;
height:200px;
padding:5px 10px 15px;
position:fixed;
width:400px;
z-index:100;
}
Tested in FF-FireBug
better if you want to show hints or information to the user about a field, use the jQuery Beauty Tip plugin . It's fantastic and I use it in my project :)
0
a source to share