I would like to u开发者_如何学Pythonse the toggle function to show hide a table row BELOW a dynamic row, so the table would look like this
row from database with data
row I want to show hide (defaults to hide)
I know how to do this when the table is static but how do I do it when the rows are being built based on the numbers of rows from the database?
Try the following .
Specify a class for the row which will be created from database. Say the class is 'RowFromDB', then if you specify $('.RowFromDB').next()
you can get the next element.
It should not be any different if its build dynamic from .NET, you can still bind them because .NET generates the markup for you. But if its a response from an AJAX call or something you may want to look at .delegate() method or the .live() method.
精彩评论