1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-19 17:54:14 +01:00

Update row details examples to use fnIsOpen - 7758

This commit is contained in:
Allan Jardine 2011-12-15 20:43:06 +00:00
parent b725f551ca
commit 6f5ef7ef07
2 changed files with 9 additions and 9 deletions

View File

@ -57,8 +57,8 @@
* rather it is done here
*/
$('#example tbody td img').live('click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
var nTr = $(this).parents('tr')[0];
if ( oTable.fnIsOpen(nTr) )
{
/* This row is already open - close it */
this.src = "../examples_support/details_open.png";
@ -551,8 +551,8 @@ $(document).ready(function() {
* rather it is done here
*/
$('#example tbody td img').live('click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
var nTr = $(this).parents('tr')[0];
if ( oTable.fnIsOpen(nTr) )
{
/* This row is already open - close it */
this.src = "../examples_support/details_open.png";

View File

@ -44,8 +44,8 @@
} );
$('#example tbody td img').live( 'click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
var nTr = $(this).parents('tr')[0];
if ( oTable.fnIsOpen(nTr) )
{
/* This row is already open - close it */
this.src = "../examples_support/details_open.png";
@ -68,7 +68,7 @@
</div>
<h1>Preamble</h1>
<p>This example shows how you might modify the client-side show/hide details rows example for use with DataTables 1.5's server-side processing option.</p>
<p>This example shows how you might modify the client-side show/hide details rows example for use with DataTables server-side processing option.</p>
<h1>Live example</h1>
<div id="dynamic">
@ -136,8 +136,8 @@ $(document).ready(function() {
} );
$('#example tbody td img').live( 'click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
var nTr = $(this).parents('tr')[0];
if ( oTable.fnIsOpen(nTr) )
{
/* This row is already open - close it */
this.src = "../examples_support/details_open.png";