thephase51
-
Posts
7 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by thephase51
-
-
-
yes, but thanks for responding
-
Hi, i need to have an optimised video on my mobile home page, I have been using the following code on page header injection but to no avail. The page is accessible via https://www.bumphaus.com/home-1
<style>
@media screen and ( max-width : 767px ) {
[data-section-id="64f5a7264f39e02a98d3cc42"] {
display : none ! Important;
}
}
@media screen and ( min-width : 768px ) {
[data-section-id="645a5771a9fcec01afb17139"] {
display : none! Important;
}
}
</style>
-
Hi, im trying to add alternate mobile and desktop video banners and having trouble with the code, can someone help?
Im using the following in the page settings - page header injections
<style>
@media screen and ( max-width : 767px ) {
[data-section-id="64f5a7264f39e02a98d3cc42"] {
display : none ! Important;
}
}
@media screen and ( min-width : 768px ) {
[data-section-id="645a5771a9fcec01afb17139"] {
display : none! Important;
}
}
<style>You can see the page here https://www.bumphaus.com/home-1
How do I redirect new members to buy the membership I'm offering?
in Site Structure & Navigation
Posted · Edited by thephase51
Hi i coded a fix for this, add this code to the developer - page injection - footer
Replace 'my url.com' with required url
<script src="https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.js"></script>
<script>
const div = document.querySelector("body");
const callback = function(records) {
records.forEach(function(record) {
if (record.removedNodes.length > 0) {
if (record.removedNodes[0].classList.contains('auth')) {
Cookies.remove('logged-in');
}
if (record.removedNodes[0].classList.contains('unauth')) {
// logged in action
if (!Cookies.get('logged-in')) {
Cookies.set('logged-in', 'true');
if (window.location.href !== 'https://www.myurl.com') {
window.location.href = 'https://www.myurl.com';
}
}
}
}
});
}
const config = {
childList: true,
subtree: true
};
const observer = new MutationObserver(callback);
observer.observe(div, config);
</script>