- This topic is empty.
-
AuthorPosts
-
May 11, 2014 at 1:54 pm #169824bmoneruiuxParticipant
Tried to do an all CSS version while waiting on you to contact Lea. It looks great in the Pen, but it looked mangled and crazy on the site lol.
May 11, 2014 at 2:40 pm #169830chrisburtonParticipantbut it looked mangled and crazy on the site lol.
If it works on CodePen it should work on the site. Something is wrong or overriding your CSS. When you say “mangled”, make sure we can see what it’s doing. That may be able to help pinpoint the problem.
Lea hasn’t responded yet but I bet it’s not a bug and something is wrong within your CSS.
May 11, 2014 at 2:45 pm #169832bmoneruiuxParticipantHey Chris…I did some sniffing and I think there’s a event listener on
#logo a
to see if<?php echo home_url( '/' ); ?>
is still the value of thehref
attribute. And if it’s not, it prepends that missing value to whatever value you may have in there.Can’t prove it yet though as I’m not amazing at JS or jQuery…yet…
But that’s the only explanation I have for this as PHP can’t replace a value all on it’s own like that from what I know (which is little).
May 11, 2014 at 6:26 pm #169837chrisburtonParticipantHey, I’ll have to take a look tomorrow morning. I’m not that experienced with jQuery but I’ll do my best.
May 13, 2014 at 8:22 am #170023bmoneruiuxParticipantNo need. I’m stupid…I forgot that any text in the href without a protocol is assumed to be a relative path if there is no / or protocol. But the root of the problem is that there’s a Chrome and Safari bug with fill transition animations placed on a PREVIOUSLY visited link SVG graphic. The workaround is to use something like:
<a href="http:/mysite.com/?foo=<?php echo rand(0, 99999) ?>">My Link</a>
…to confused the browser into thinking it’s a brand new link. And since that function is crap, the browser will 99% of the time ignore it and settle on just the URL. Which would then restore the workings of the SVG fill transition.
The other workaround offered was something like:
$('body').on('click', 'a', function() { e.preventDefault(); var url = $(this).prop('href'); window.location.href = url.split("?")[0]; });
…But I’m not 100% on it’s usage yet.
May 13, 2014 at 8:31 am #170025chrisburtonParticipantI would go with the php solution. I posted the issue on SO but never received a proper answer.
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.