javascript – if span element value is, how use conditions?-ThrowExceptions

Exception or error:

I have span code:

<span style="width: 93%;">

Span have percentage value. I need javascript code when I change this span value below 50% it will show

    Task completed in **[percent value from span here]**


show this text and hide 2 classes (progress bar and image)

    **[percent value from span here]** left to complete the task

Thanks you a lot!

How to solve:

If you are looking for a way to alter CSS or show an hide based on the span value, onchange will be the way to go. This specific part for span with onchange is covered in the following thread:
Trigger for span text/html on changed

Leave a Reply

Your email address will not be published. Required fields are marked *