0

I am using elementor for one of the website and it generates following CSS

.elementor-3440 .elementor-element.elementor-element-8fae002 .elementskit-navbar-nav > li.current-menu-item > a {
    color: var( --e-global-color-accent );
}

when URL link have href="https://example.com/#menu"

and when URL link ishref="#menu" above mentioned CSS is not generate. It is creating design break for me as i need to use absolute url for links as i have to add new pages to website as before it was single page website.

I have tried to remove this CSS using following jQuery but it not working

$(".elementor-3440 .elementor-element.elementor-element-8fae002 .elementskit-navbar-nav > li.current-menu-item > a").css('color','');

I simply want to remove this css using jquery

.elementor-3440 .elementor-element.elementor-element-8fae002 .elementskit-navbar-nav > li.current-menu-item > a {
    color: var( --e-global-color-accent );
}
4
  • 1
    Does this answer your question? How to remove css property in jQuery Commented Oct 26, 2021 at 5:49
  • what do you see in F12? maybe the style that you add override by the original one Commented Oct 26, 2021 at 5:57
  • i sdont see css value of jquery rather autogenerate css .elementor-3440 .elementor-element.elementor-element-8fae002 .elementskit-navbar-nav > li.current-menu-item > a { color: var( --e-global-color-accent ); } Commented Oct 26, 2021 at 5:58
  • maybe try to add class to this element and in css add to this class your wanted style(i think first try to console.log the element to see if you have any result maybe it does not find this element) Commented Oct 26, 2021 at 6:02

1 Answer 1

0

Have you tried something like this:

$('.elementor-element-8fae002').css('color','initial');
Sign up to request clarification or add additional context in comments.

8 Comments

you can also use 'black' (or whatever other color you wish that element to have as a color)
I am already using blank it still take the value on main css defined in question
Hm. Can you edit then the theme stylesheet using a child theme setup?
Like just go and change that in the theme core CSS using a child theme, so your edits don't get wiped at theme update? I know it's hacky but it would work well i think.
Its is auto generate by Elementor cant change it, for this reason i am trying jQuery to target this css
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.