preview site for fix and fresh
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/*parsed HTML*/
|
||||
$(function(){
|
||||
$(".maxheight").each(function(){
|
||||
$(this).contents().wrapAll("<div class='box_inner'></div>");
|
||||
})
|
||||
$(".maxheight1").each(function(){
|
||||
$(this).contents().wrapAll("<div class='box_inner'></div>");
|
||||
})
|
||||
|
||||
})
|
||||
/*add event*/
|
||||
$(window).bind("resize", height_handler).bind("load", height_handler)
|
||||
function height_handler(){
|
||||
if($(window).width()>767){
|
||||
$(".maxheight").equalHeights();
|
||||
}else{
|
||||
$(".maxheight").css({'height':'auto'});
|
||||
}
|
||||
if($(window).width()>767){
|
||||
$(".maxheight1").equalHeights();
|
||||
}else{
|
||||
$(".maxheight1").css({'height':'auto'});
|
||||
}
|
||||
}
|
||||
/*glob function*/
|
||||
(function($){
|
||||
$.fn.equalHeights=function(minHeight,maxHeight){
|
||||
tallest=(minHeight)?minHeight:0;
|
||||
this.each(function(){
|
||||
if($(">.box_inner", this).outerHeight()>tallest){
|
||||
tallest=$(">.box_inner", this).outerHeight()
|
||||
}
|
||||
});
|
||||
if((maxHeight)&&tallest>maxHeight) tallest=maxHeight;
|
||||
return this.each(function(){$(this).height(tallest)})
|
||||
}
|
||||
})(jQuery)
|
||||
Reference in New Issue
Block a user