Code Snippet in Header

Hello!
I must use this code in Header

<script>(function(e){e.extend(e.expr[":"],{uppercase:function(t){var n=e(t).css("text-transform");return typeof n!=="undefined"&&n==="uppercase"},smallcaps:function(t){var n=e(t).css("font-variant");return typeof n!=="undefined"&&n==="small-caps"}});e.extend({removeAcc:function(e){var t=e.tagName.toLowerCase()=="input"?e.value:e.innerHTML;t=t.replace(/Ά/g,"Α");t=t.replace(/ά/g,"α");t=t.replace(/Έ/g,"Ε");t=t.replace(/έ/g,"ε");t=t.replace(/Ή/g,"Η");t=t.replace(/ή/g,"η");t=t.replace(/Ί/g,"Ι");t=t.replace(/Ϊ/g,"Ι");t=t.replace(/ί/g,"ι");t=t.replace(/ϊ/g,"ι");t=t.replace(/ΐ/g,"ι");t=t.replace(/Ό/g,"Ο");t=t.replace(/ό/g,"ο");t=t.replace(/Ύ/g,"Υ");t=t.replace(/Ϋ/g,"Υ");t=t.replace(/ύ/g,"υ");t=t.replace(/ϋ/g,"υ");t=t.replace(/ΰ/g,"υ");t=t.replace(/Ώ/g,"Ω");t=t.replace(/ώ/g,"ω");e.tagName.toLowerCase()=="input"?e.value=t:e.innerHTML=t}});e.fn.extend({removeAcc:function(){return this.each(function(){e.removeAcc(this)})}})})(jQuery);jQuery(document).ready(function(e){e(":uppercase").removeAcc();e(document).ajaxComplete(function(t,n,r){e(":uppercase").removeAcc()})})</script>

But when i do it, the Category Filters at https://www.sfountourislaw.gr/news/?lang=en doesn’t work. I am using Ethos Template.

If you have any other way to put this snippet in Header in order for the filters to work, or if you think that i must change the code, please let me know…

Thank you

Hi Stelios,

Thank you for writing in, how or where did you place that script? The most effective way to add a script on <head> of footer (before </body>) is to use the Insert Headers and Footers plugin.

Hope it helps,
Cheers!

Hi, i used the Insert Headers and Footers plugin and put the code into header, but the Category Filters don’t work.
It is the code that i put that causes the problem, but i don’t know why… Can you help me please?

Hi Stelios,

Yeah, more likely that issue is with the script. Regretfully, we cannot provide support for third-party scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X or PRO will need to be directed to the original developer.

Thank you for your understanding.

Thank you for your answer.
Unfortunantly the code has no developer. I just found it from a Joomla user.
There is a problem that you may come to in the future.
Edge browser has a problem with Greek letters.
You see, greek letters have some punctuation marks, like a tone (ex.Κρήτη), but we (greeks) don’t use theme in Capital letters (ex. ΚΡΗΤΗ not ΚΡΉΤΗ).
When there is an Uppercase, at all browsers you will see ΚΡΗΤΗ, except Edge. At Edge you will see ΚΡΉΤΗ.
Now this code, transforms ΚΡΉΤΗ to ΚΡΗΤΗ.
I am writing these details in order to have the knoledge of the problem.

Thanks again!

Ah, thanks for the heads up, Stelios.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.