You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I tried to implement this into our site. The problem (I know this is not semantically right) is that we have style elements inside the body element, with import. We have to use this solution within our solution in some cases.
As you can see it pushes the a-tag inside the import which kind of kills the look of different parts on the page.
In other words, this solution does not work:
<divclass="arena-columns-1-2-1-2-1">
Linkify this link: www.i-should-be-linkyfied.com
But this is HTML and should not be linkyfied:
<stylemedia="screen" type="text/css">
@import url("//cdn.axiell.com/arena/instagram-feed.css");
</style></div>
I thought that I figured out the solution, so I tried this. The script seems right (The console.log shows that there is only one style element in the HTML above). But still it linkyfies the import src anyway, like it runs after the each and if statement:
jQuery(document).ready(function(){// LOOP THROUGH EVERY ELEMENT IN WITHIN BODYjQuery('body *').each(function(){// IF THE ELEMENT IS NOT(!) STYLE OR SOME SOME SPECIFIC IDS, LINKYFY ITif(!jQuery(this).is('style, #instagram-feed, #twitter-feed, #facebook-feed')){jQuery(this).linkify();// JUST FOR TESTINGconsole.log("Not style element");// jQuery(this).addClass("no-style");}else{console.log("style element");// jQuery(this).addClass("i-am-style");// / JUST FOR TESTING};});});
Hello! I tried to implement this into our site. The problem (I know this is not semantically right) is that we have style elements inside the body element, with import. We have to use this solution within our solution in some cases.
This is what the script do with a file import:
As you can see it pushes the a-tag inside the import which kind of kills the look of different parts on the page.
In other words, this solution does not work:
Anyone know how to solve? :)
The text was updated successfully, but these errors were encountered: