This is a SEO question, which you can ask here: https://webmasters.stackexchange.com/
Google will disregard anything that's not displaying. Remember that Google
works with the source code not the outcome, so anything you do in your source code except server side, is public.
Even if they detect displaying blue words on blue background, Google will disregard that too or even punish for such technique.
Having a display:none is not so serious however, as we know that sometimes its use cannot be avoided. But sometimes there are better ways for swapping content than toggle() in jQ. Try to enhance your code to contain less or no non-displaying content, and it will be okay in SEO POV
.
Rendering the page for the first time should return no non-displaying content, so Google will not detect a black hat
trial. After that, you can do anything with JS
, it wont affect SERP rankings.