All pastes #154035 Raw Edit

Someone

public javascript v1 · immutable
#154035 ·published 2006-08-30 02:30 UTC
rendered paste body
var table = $.TABLE(	{ 	id:'dataTable', 'cellspacing':'0', 'cellpadding':'0',		filter: function( string ){			var string = string;			alert( string );						var dataRows = $('#dataTable').find('tr').not('.header'); 			dataRows.each( function( i ) { 					console.log( 'forEach row: ' + string );					row =  $('#dataTable').find('tr').not('.header')[i];					filterable_elements = $(row).find('.filterable');					//console.log( filterable_elements );										$( filterable_elements ).each(						function() {							//console.log( this.innerHTML );														var re = new RegExp( 'M' );																				if( !this.innerHTML.match(re) )							{								console.log( this.innerHTML + ' Would be hidden ...' );								$(this.parentNode).css({   									 display:'none'  									}  								);							}							else							{	$(this.parentNode).css({   									 display:''  									}  								);								console.log( this.innerHTML + ' Would be shown ...' );							}						}					);										//$(filterable_elements).each(					//	function ( el ){ console.log( $(el) ); }					//);				}			);		}		},	$.TR(		{ id:'header', class:'header' },		$.TH(			{ id:'gap::symbol' },			'Symbol'		),		$.TH(			{ id:'gap::gap%' },			'Gap %'		),		$.TH(			{ id:'gap::adr10' },			'ADR 10'		),		$.TH(			{ id:'gap::vol' },			'Volume'		)	),		$.TR(		{ id:'gap::1', class:'stock gap' },		$.TD(			{ id:'gap::1::symbol', class:'filterable', class:'filterable' },			'XMSR'		),		$.TD(			{ id:'gap::1::gap%' },			'10.2'		),		$.TD(			{ id:'gap::1::adr10' },			'1.22'		),		$.TD(			{ id:'gap::1::vol' },			'123943928'		)	),		$.TR(		{ id:'gap::1', class:'stock gap' },		$.TD(			{ id:'gap::1::symbol', class:'filterable' },			'GOOG'		),		$.TD(			{ id:'gap::1::gap%' },			'2.3'		),		$.TD(			{ id:'gap::1::adr10' },			'2.32'		),		$.TD(			{ id:'gap::1::vol' },			'123943928'		)	),		$.TR(		{ id:'gap::1', class:'stock gap' },		$.TD(			{ id:'gap::1::symbol', class:'filterable' },			'MSFT'		),		$.TD(			{ id:'gap::1::gap%' },			'6.4'		),		$.TD(			{ id:'gap::1::adr10' },			'0.15'		),		$.TD(			{ id:'gap::1::vol' },			'374927693'		)	),		$.TR(		{ id:'gap::1', class:'stock gap' },		$.TD(			{ id:'gap::1::symbol', class:'filterable' },			'AAPL'		),		$.TD(			{ id:'gap::1::gap%' },			'1.2'		),		$.TD(			{ id:'gap::1::adr10' },			'0.65'		),		$.TD(			{ id:'gap::1::vol' },			'173859203'		)	));