- disabled expanding cards on mobile devices
This commit is contained in:
parent
4b5b7a9464
commit
962bfa780d
@ -35,26 +35,30 @@ function init_home_cards(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".expandable-card").on('mouseenter', function(e) {
|
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
|
||||||
var width = $(this).width();
|
$(".expandable-card").addClass('scrollbar');
|
||||||
var avail_space = $(window).height() - $(this).offset().top + $(this).height();
|
} else {
|
||||||
console.log(avail_space)
|
$(".expandable-card").on('mouseenter', function(e) {
|
||||||
$(this).css("position", "absolute");
|
var width = $(this).width();
|
||||||
$(this).css("max-height", "unset");
|
var avail_space = $(window).height() - $(this).offset().top + $(this).height();
|
||||||
$(this).css("overflow", "auto");
|
console.log(avail_space)
|
||||||
$(this).css("height", "auto");
|
$(this).css("position", "absolute");
|
||||||
$(this).css("width", width);
|
$(this).css("max-height", "unset");
|
||||||
$(this).css("z-index", 888);
|
$(this).css("overflow", "auto");
|
||||||
});
|
$(this).css("height", "auto");
|
||||||
$(".expandable-card").on('mouseleave', function(e) {
|
$(this).css("width", width);
|
||||||
var width = $(this).width()
|
$(this).css("z-index", 888);
|
||||||
$(this).css("position", "relative");
|
});
|
||||||
$(this).css("max-height", "146px");
|
$(".expandable-card").on('mouseleave', function(e) {
|
||||||
$(this).css("overflow", "hidden");
|
var width = $(this).width()
|
||||||
$(this).css("height", "146px");
|
$(this).css("position", "relative");
|
||||||
$(this).css("width", width);
|
$(this).css("max-height", "146px");
|
||||||
$(this).css("z-index", 1);
|
$(this).css("overflow", "hidden");
|
||||||
});
|
$(this).css("height", "146px");
|
||||||
|
$(this).css("width", width);
|
||||||
|
$(this).css("z-index", 1);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user