jQuery("#noteControl").live('click',function(){
if(jQuery(this).attr('src').match("plus_green"))
{
currentRow = jQuery(this).closest("tr");
currentRow = jQuery(this).parent().parent();
jQuery(this).attr({'src' : '/media/minus_red.png'});
thisTable.fnOpen(currentRow, "allsorts!",'details');
}else
{
currentRow = jQuery(this).parent().parent();
jQuery(this).attr({'src' : '/media/plus_green.png'});
thisTable.fnClose(currentRow);
}
" $('td img', oTable.fnGetNodes() ).each( function () {
$(this).click( function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('icon_minus') )
{
/* This row is already open - close it */
this.src = "./custom/layout/images/icons/icon_plus.gif";
oTable.fnClose( nTr );
}
else
{
/* Open this row */
this.src = "./custom/layout/images/icons/icon_minus.gif";
oTable.fnOpen( nTr, fnFormatDetails(nTr), 'icon' );
}
} );
} );
$('#mainTable tbody tr').live( 'click', function () {
var nTr = this;
if ( $(this).hasClass('highlighted') )
{
/* This row is already open - close it */
//oTable.fnClose( this ); //not working
$(this).next().remove();
$(this).removeClass('highlighted')
}
else
{
/* Open this row */
$(this).addClass('highlighted')
oTable.fnOpen( nTr, fnFormatDetails(nTr), 'listingDetails opened' );
}
} );
//Show-hide extra row info
$('#example tbody tr').live( 'click', function () {
var nTr = this;
if ( $(this).hasClass('highlighted') )
{
/* This row is already open - close it */
oTable.fnClose( this );
$(this).removeClass('highlighted')
}
else
{
/* Open this row, if it's classy enough */
if ( oTable.fnGetData( nTr ) == null ) return;
$(this).addClass('highlighted')
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'listingDetails opened' );
}
} );
var nRemove = $j(nTr).next()[0];
nRemove.parentNode.removeChild( nRemove );
It looks like you're new here. If you want to get involved, click one of these buttons!
Get useful and friendly help straight from the source.