garyilm
asked on
Jquery Hide
I have a dynamic table with a toggle show row. When the page loads the sub rows are visiable. How do I make them hidden until I expand them. Here is the code that I am working with.
<script type="text/javascript">
function togglePanelMore(thenext, source) {
var viewContainer = $(thenext);
if ($(source).html() == "-") {
$(source).html("+");
viewContainer.hide();
}
else {
$(source).html("-");
viewContainer.show();
}
}
</script>
<a href="javascript:togglePan elMore('#r ow<%=i+1%> ', '#togglerow<%=i+1%>')" id="togglerow<%=i+1%>">+</ a>
<script type="text/javascript">
function togglePanelMore(thenext, source) {
var viewContainer = $(thenext);
if ($(source).html() == "-") {
$(source).html("+");
viewContainer.hide();
}
else {
$(source).html("-");
viewContainer.show();
}
}
</script>
<a href="javascript:togglePan
Add
$(thenext).hide();
At the beginning of your script, this will hide the row by default.
$(thenext).hide();
At the beginning of your script, this will hide the row by default.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window