I have the following jquery code below that works so that when i click on the plus it expands and closes on the minus so all is well there. What I can't find out is how do I get the first inner grid row to automatically display as if the plus image was clicked.
In many cases there is only one inner grid row so I want that row to display by default.
$("[src*=plus]").live("click", function () {
$(this).closest("tr").after("
| " + $(this).next().html() + " |
")
$(this).attr("src", "images/minus.png");
});
$("[src*=minus]").live("click", function () {
$(this).attr("src", "images/plus.png");
$(this).closest("tr").next().remove();
});
thanks
Ron
What I have tried:
tried combinations of show to no avail. Can't find anything that targets the img as if clicked