Text highlight animation
-
Hello, i have a jQuery animation that highlights a piece of text. You can see it on my info page.
Problem:
It only works when you directly load the page. if you navigate to it from the landing page it does not work.The jQuery used:
<script>window.laytheme.on("newpageshown", function(layoutObj, type, obj) {
if(type == "page" && obj.id == 2223){
jQuery(".note").addClass("markit");
}else{
jQuery(".note").removeClass("markit");
}
});
</script>Thank you for your help, folks.
F -
solved it with:
.note {
mix-blend-mode: multiply;
background: linear-gradient(to left, transparent 50%, yellow 50%) right;
background-size: 200%;
transition: 2s ease-out;
background-position: 0%;
animation: marker 5s;
}@-webkit-keyframes marker {
0% { background-position: 100%; }
100% { background-position: 0%; }
}
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it