How can I prevent JavaScript from breaking when ReadSpeaker is active?

If you have Javascript content inside the reading area these objects can break when ReadSpeaker is active.
This is because we add temporary HTML code to be able to highlight the content that is going to be read.

However, we have built a solution to solve this kind of issues. By adding the class="rs_preserve" to the object that breaks when ReadSpeaker is active, we attempt to preserve it. This means that highlighting will not be added to that object.
If it contains text, the text will still be read. If you don't want the content to be read at all we recommend that you also add our class "rs_skip".

Example:

<div class="rs_preserve">This div will not be highlighted by ReadSpeaker, but it will be read.</div>

Please note that you can not use rs_preserve inside an element that is already have rs_preserve added. If you have an element with the class "rs_preserve" inside another element with the class "rs_preserve" the second element will disappear when ReadSpeaker is activated.

Example:

<div class="rs_preserve">This div will not be highlighted by ReadSpeaker, but it will be read.
<div class="rs_preserve">This div will disappear when ReadSpeaker is activated.</div>
</div>