0

I have a much larger javascript with some ajax that basically checks for a condition, on success:

success: function(){ document.getElementById('res-cancel-message').style.color = "#008000"; $("#res-cancel-message").html('<a>Your reservation has been cancelled and a confirmation has been sent to your email address.</a>');

Currently this script changes the color of the res-cancel-message div and then populates it with some text. What I am trying to do is change the size of the text as well, to 10pt. Unfortunately I have tried all kinds of simple style changes such as the color change I used in the above code, to no avail.

Any ideas?

1 Answer 1

1

If you tried using:

document.getElementById('res-cancel-message').style.font-size = 'something';

It wont work, you need to remove - and capitalize the first letter of following word like this:

document.getElementById('res-cancel-message').style.fontSize = '10pt';
Sign up to request clarification or add additional context in comments.

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.