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%; }
}
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login