API  tools  faq  
paste  



Login  Sign up  














SHARE

TWEET
 

Guest User

Modernizr display tests for table layout

 


a guest 

Nov 2nd, 2010  

30,107 

0 

Never 

Add comment 






Not a member of Pastebin yet?  Sign Up,  it unlocks many cool features! 





JavaScript 0.52 KB   | None  |  0 0 

raw  download  clone  embed  print   report  



(function() {

    var displayTests = ["table", "table-caption", "table-cell", 

    "table-column", "table-column-group", "table-footer-group", 

    "table-header-group", "table-row", "table-row-group"];

    

    var rules = document.createElement("div").style;

 

    for (varc=0;c<displayTests.length;c++) {

        var testValue = displayTests[c];

        Modernizr.addTest("display" + testValue, function() {

            try {

                rules.display = testValue;

                return rules.display == testValue;

            } catch (e) {

                return false;

            }

        })

    }

}());

 



Advertisement

 



Add Comment 


Please, Sign In to add comment 







Public Pastes  


Untitled  
48 min ago  | 10.12 KB 


Untitled  
48 min ago  | 5.91 KB 


Untitled  
2 hours ago  | 9.65 KB 


Untitled  
2 hours ago  | 7.86 KB 


DxDiag  
2 hours ago  | 117.87 KB 


Untitled  
4 hours ago  | 12.22 KB 


Untitled  
4 hours ago  | 8.81 KB 


Untitled  
6 hours ago  | 10.82 KB 

















create new paste  /   syntax languages  /   archive  /   faq  /   tools  /   night mode  /   api  /   scraping api  /   news  /   pro  
privacy statement  /   cookies policy  /   terms of service /   security disclosure  /   dmca  /   report abuse  /   contact  

By using Pastebin.com you agree to our cookies policy to enhance your experience.  
Site design & logo © 2026 Pastebin  





We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.  OK, I Understand  



Not a member of Pastebin yet?
 Sign Up, it unlocks many cool features!