Skip to content

Instantly share code, notes, and snippets.

@novalagung
Created October 30, 2012 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save novalagung/3979190 to your computer and use it in GitHub Desktop.
Save novalagung/3979190 to your computer and use it in GitHub Desktop.
var oWindow = $(window);
var minus = 120;
if(oWindow.height() < 720) {
if (oWindow.height() > 540) {
$('#zahirunitlistmain-panel').height(oWindow.height() - minus);
grid.setHeight(oWindow.height() - (minus + 80));
} else {
$('#zahirunitlistmain-panel').height(541 - minus);
grid.setHeight(541 - (minus + 80));
}
}
oWindow.resize(function(){
var dis = $(this);
console.log(dis.height());
if (dis.height() > 540 /** 640 */ && dis.height() < 720) {
$('#zahirunitlistmain-panel').height(dis.height() - minus);
grid.setHeight(dis.height() - (minus + 80));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment