-1

I need example of expandable table row, I found this is the best choice so far:

http://www.jqueryscript.net/table/jQuery-Plugin-For-Expandable-Bootstrap-Table-Rows.html

demo: http://www.jqueryscript.net/demo/jQuery-Plugin-For-Expandable-Bootstrap-Table-Rows/

The table will expand when I click the header. My question is: how to make the table expanded by default?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
We Can
  • 1
  • 1

2 Answers2

0

I think you can write jQuery for this. Below code should help to solve your query.

$("table tbody tr:first-child").next("tr").toggle();
$("table tbody tr:first-child").find(".arrow").toggleClass("up");
Nimmi
  • 1,997
  • 2
  • 12
  • 20
0

add this below jquery will keep table expanded by default once document is loaded

$(document).ready(function(){
  $("tbody>tr").css("display", "table-row");
});
Iqbal Pasha
  • 1,318
  • 1
  • 8
  • 12
  • You are always welcome :) If it is useful give a vote :) – Iqbal Pasha Mar 04 '16 at 08:57
  • 1
    sure I voted it immediately yesterday, but there is message: "Thanks for the feedback, Once you earn a total of 15 reputation, your votes will change the publicly displayed post score". – We Can Mar 05 '16 at 09:11