fixed hover on big articles on resize
This commit is contained in:
@@ -204,11 +204,11 @@
|
||||
}
|
||||
//wrap classes
|
||||
for (let i = 0; i < articleWrapCounter; i++) {
|
||||
var j = i + 1
|
||||
let j = i + 1
|
||||
if (isHome) {
|
||||
j = i + 3
|
||||
}
|
||||
var k = i + 1
|
||||
let k = i + 1
|
||||
$(".home-thumbnail-small-" + k).wrapAll('<div class="home_wrapper-small home_wrapper-' + j + '"></div>')
|
||||
if (i == 0) {
|
||||
$(".home_wrapper-" + j).addClass("home_wrapper-s1")
|
||||
@@ -241,7 +241,7 @@
|
||||
|
||||
function moveBevezetoDesktop() {
|
||||
$("article>.bevezetoWrapper").each(function () {
|
||||
$(this).parent('article').children('.metadata').append($(this))
|
||||
$(this).parent('article').children('.metadata').children('.postedon').after($(this))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -821,12 +821,16 @@
|
||||
|
||||
//hover on big articles
|
||||
|
||||
$(".home-big h2 a").hover(function () {
|
||||
$('body').on('mouseenter', '.home-big h2 a', function () {
|
||||
bigArticleHoverShow($(this))
|
||||
})
|
||||
$('body').on('mouseleave', '.home-big h2 a', function () {
|
||||
bigArticleHoverHide($(this))
|
||||
})
|
||||
|
||||
}, function () {
|
||||
|
||||
let cc = $(this)
|
||||
function bigArticleHoverHide(cc) {
|
||||
// let cc = $(this)
|
||||
if (!isMobile) {
|
||||
let cArticle = cc.parents("article")
|
||||
let cMetadata = cArticle.children(".metadata")
|
||||
|
||||
@@ -846,11 +850,13 @@
|
||||
//hide and show metadata
|
||||
cMetadata.children(".alcimWrapper, .bevezetoWrapper").css({ display: 'none' }).removeClass("transparent")
|
||||
cMetadata.children(".categories, .postedon").removeClass("transparent").show()
|
||||
cMetadata.css({ height: '' })
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function bigArticleHoverShow(cc) {
|
||||
if (!isMobile) {
|
||||
// let cc = $(this)
|
||||
let cArticle = cc.parents("article")
|
||||
let cMetadata = cArticle.children(".metadata")
|
||||
@@ -926,6 +932,7 @@
|
||||
ellipsis.set();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Uncomment for debugging hover
|
||||
// if (!isMobile && isHome) {
|
||||
@@ -938,14 +945,14 @@
|
||||
/* ------------------------- hover on small articles ------------------------ */
|
||||
|
||||
function showTitle(th) {
|
||||
if (!$('body').hasClass('no-result')) {
|
||||
if (!$('body').hasClass('no-result') && !isMobile) {
|
||||
$(th).children("h2").show()
|
||||
$(th).children(".metadata").addClass("vis")
|
||||
}
|
||||
}
|
||||
|
||||
function hideTitle(th) {
|
||||
if (!$('body').hasClass('no-result')) {
|
||||
if (!$('body').hasClass('no-result') && !isMobile) {
|
||||
$(th).children("h2").hide()
|
||||
$(th).children(".metadata").removeClass("vis")
|
||||
}
|
||||
@@ -1159,6 +1166,8 @@
|
||||
// calc other vars
|
||||
menuWidth = mwCalc()
|
||||
|
||||
articleWrapCounter = 0
|
||||
|
||||
//run load script
|
||||
loadPage()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user