Fix home RWD
This commit is contained in:
@@ -49,3 +49,66 @@ $(function () {
|
||||
$("#btn_continue_shopping").trigger("click")
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
$(function () {
|
||||
$(window).on("load", function () {
|
||||
let phoneBox = $("#_desktop_contact_link_temp").html();
|
||||
$('#nav-phone-numb').html(phoneBox);
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
let originalParent = $("#st_banner_11").parent();
|
||||
let originalPosition = $("#st_banner_11").index();
|
||||
|
||||
function moveBanner() {
|
||||
let banner = $("#st_banner_11");
|
||||
let targetSection = $("#content-wrapper #content .blog.blocks.displayHome");
|
||||
|
||||
if ($(window).width() <= 767) {
|
||||
if (banner.parent().attr("id") !== "content") {
|
||||
banner.detach().insertBefore(targetSection);
|
||||
}
|
||||
} else {
|
||||
if (banner.parent().attr("id") !== originalParent.attr("id")) {
|
||||
if (originalPosition === 0) {
|
||||
originalParent.prepend(banner);
|
||||
} else {
|
||||
banner.detach().insertAfter(originalParent.children().eq(originalPosition - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
moveBanner();
|
||||
$(window).on("resize", moveBanner);
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
let originalParentCustomText = $("#custom-text").parent();
|
||||
let originalPositionCustomText = $("#custom-text").index();
|
||||
|
||||
function moveCustomText() {
|
||||
let customText = $("#custom-text");
|
||||
let banner = $("#st_banner_11");
|
||||
|
||||
if ($(window).width() <= 576) {
|
||||
if (customText.next("#st_banner_11").length === 0) {
|
||||
customText.detach().insertAfter(banner);
|
||||
}
|
||||
} else {
|
||||
if (customText.parent().attr("id") !== originalParentCustomText.attr("id")) {
|
||||
if (originalPositionCustomText === 0) {
|
||||
originalParentCustomText.prepend(customText);
|
||||
} else {
|
||||
customText.detach().insertAfter(originalParentCustomText.children().eq(originalPositionCustomText - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
moveCustomText();
|
||||
|
||||
$(window).on("resize", moveCustomText);
|
||||
});
|
||||
Reference in New Issue
Block a user