开发者

Expand Table Row to show content within table Jquery Plugin

I came across this plugin a while back and never bookmarked it. I was hoping someone might know the name of it or link me up.

The plugin is for a table and it allows you expand on each row within the table. So if you click the "View" button within a table row then the table would open up on that row and there would be some sort of content shown below the row you clicked. The key is that it is all kept within the table and the co开发者_运维知识库ntent section below the table row does not have all of the columns of the table.


It's not a plugin (I guess).

Basically you can reach such functionality with very simple code. For example:

<table>
  <tbody>
     <tr>
       <td>
          Somecontent
          <div class="hidden-content" style="display:none">Some hidden content</div>
       </td>
       <td>
         <a href="#" class="display-hidden">view</div>
       </td>
     </tr>
   </tbody>
</table>

Then the expanding script will be:

<script type="text/javascript">
  $('.display-hidden').click(function(){
    $(this).parent().prev().find('div.hidden-content').slideToggle('fast');
  })
</script>

No need of plugins at all.


I think you're referring to jExpand.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜