Skip to content

Instantly share code, notes, and snippets.

@dcneiner
Created September 13, 2010 22:26
Show Gist options
  • Save dcneiner/37ccfa73b624772a6f62 to your computer and use it in GitHub Desktop.
Save dcneiner/37ccfa73b624772a6f62 to your computer and use it in GitHub Desktop.
$.support.multipleClasses = (function(){
var fakeBody = $('<body></body>').prependTo($("html")),
testDiv = $('<div class="jq-shorter jq-taller" style="line-height:0"></div>').prependTo(fakeBody),
testStyle = $('<style type="text/css">.jq-shorter.jq-taller { height: 5px} .jq-taller { height: 10px} </style>').prependTo(fakeBody),
divHeight = testDiv[0].offsetHeight;
fakeBody.remove();
return divHeight === 5;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment