Target Pseudo Element Blocked by Theme JS

Hi,

I’m trying to apply some :target styling to a page with in page anchors. Nothing I do is allowing for active style changing. If I refresh the page with the necessary anchor tag, like example.com#anchor, the :target styling will be permanently applied to the element with the id. Some investigating (ie, removing all external styles and javascript from the page until what I need to happen happens) reveals that one of the theme javascript files, x.js, is preventing target pseudo styling. Is there something I can do to make this work? Since the javascript is obfuscated, I can’t deduce:

  • What function is preventing this
  • What the function is supposed to do AND
  • What steps I need to do take to fix functionality

Thanks.

Hi Joseph,

Thanks for reaching out.
We have never encountered such a problem and have never been reported by anyone before you. I would request you if you can show some examples or share some URLs where we can check that problem.

Thanks

Hi Tristup,

Added a secure note to my original post with the URL and password.

Note, the :target is specific to section:target h4. What should happen is once a link is clicked in the left navigation bar, the h4 in the section to the right should have an orange, 2px, solid border. My understanding of target, and in fact what is taught by W3 School, is that the element with id in question should have styling applied to it.

Hey Joseph,

I was able to replicate your issue on my development website and I suspect that it was a conflict between our native scroll features. I’ll report this as a bug so that our developers will be aware of the said issue.

Regretfully, there’s no simple solution to achieve your goal, it will require custom JS code to override the functionality. You may seek 3rd party developers to help you with your problems or you can avail Elite where they do custom development if you want to achieve your goal.

Thank you for understanding.

Totally understand. It’s not a game breaking issue. I’ll come up with another solution or a work around and wait patiently for a bug fix. I appreciate it!

Hello Joseph,

We have reported the issue and the issue is in our issue tracker for our development team. I would request you, please stay tuned for succeeding theme updates.

Thanks for understanding

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