javascript - Toggle slide out div with jQuery & push div onto new line -
i'm having small issue project i'm working on.
it's simple i'm not overly proficient jquery , having few issues. want have grid of 4 item rows, once user clicks on div, slides out bio same width grid item (25%). pushes div beside onto new row.
to give idea, it's "our team" page, page display photo of in grid , if click person slides out bio.
here code:
html
<div class="team-list one-fourth nomargin"> <div class="team-photo"> <img class="front" src="{front_image}" alt="{title}" /> </div> <div class="team-bio"> team bio here </div> </div>
css
/* team page */ .team-list { position:relative; } .team-list .team-photo img { max-width:100%; }
many in advance!
as understood looking this. hope help
add handler sliding bio info:
$('.team-photo').click(function() { $(this).next().slidetoggle(); });
and css:
/* team page */ .team-list { position:relative; cursor: pointer } .team-list .team-photo img { max-width:100%; } .team-bio { display: none; }
Comments
Post a Comment