Last active
December 20, 2015 22:59
-
-
Save srkmrs/6209447 to your computer and use it in GitHub Desktop.
Revisions
-
Sreekumar Sasidharan revised this gist
Aug 12, 2013 . 1 changed file with 23 additions and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,11 +14,10 @@ hideEmptyRows(10); function hideEmptyRows(delay){ if(delay){ /** The following style applied for testing purpose.**/ $( "div.row" ).css( "border", "1px solid green" ); setTimeout(findAndHideEmptyRows,delay); }else{ findAndHideEmptyRows(); @@ -28,31 +27,29 @@ function findAndHideEmptyRows(){ $("div.row:empty").css("display","none"); /** If browser does not support the above expression, Please uncomment the following script and run. **/ /* $("div.row" ).each(function( index ) { var content = $(this).text(); var display = false; if(content != null){ content = $.trim(content); if(content.length > 0){ display = true; }else{ display = false; } } if(!display){ $(this).css("display","none"); } }); */ /** The applied style removed after testing. **/ $( "div.row" ).css( "border", "0px" ); } -
Sreekumar Sasidharan created this gist
Aug 12, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,58 @@ /** Once the dom is rendered or ready , invoke or call the method named hideEmptyRows. How to call hideEmptyRows(1000); or hideEmptyRows(); Preferable hideEmptyRows(10); **/ function hideEmptyRows(delay){ if(delay){ /** The following style applied for testing purpose. Please comment in production mode **/ $( "div.row" ).css( "border", "1px solid green" ); setTimeout(findAndHideEmptyRows,delay); }else{ findAndHideEmptyRows(); } } function findAndHideEmptyRows(){ $("div.row:empty").css("display","none"); /** If browser does not support the above expression, Please uncomment the following script and run. **/ /* $("div.row" ).each(function( index ) { var content = $(this).text(); var display = false; if(content != null){ content = $.trim(content); if(content.length > 0){ display = true; }else{ display = false; } } if(!display){ $(this).css("display","none"); } });*/ /** The applied style removed after testing. Please comment in production mode **/ $( "div.row" ).css( "border", "0px" ); }