0

I have a CSS code:

.ui-dialog-buttonset .on{
        color: black;
        border-radius: 7px;

    }

And i want to set display = none for this using jquery:

$('#ui-dialog-buttonset .on').css('display', 'none');

It is not woring. What am I doing wrong ? Appreciate your help.

3 Answers 3

2

ui-dialog-buttonset is a class, not an id. So select it using a period, not a hash:

$('.ui-dialog-buttonset .on').css('display', 'none');
Sign up to request clarification or add additional context in comments.

Comments

0

You're telling jQuery to search for an element with id ui-dialog-buttonset because you used #. To select a class you must start with the "." like in:

$('.ui-dialog-buttonset .on').css('display', 'none');

Comments

0

.ui-dialog-buttonset - this is class #ui-dialog-buttonset - this is ID

You are changing css of different item, which probably doesn't exists on your page.

Comments

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.