I want to use a script that allows content on my site to be collapsed until the user wants to see it. I'm currently using a bit of javascript that does this but the problem is the content initially loads and then later hides once the page is fully downloaded. This is bad if I want to hide a photo or something. On another site I've seen them use javascript but it also uses CSS display: none and I'm not keen on using that in fear of Google penalising me. Can someone suggest the best method to show/hide content that is not risky in Google terms?
CSS none is the normal way to do it. Another option is to use serverside code so that it is only present on the client side when it is to be displayed (with or without using Ajax to reveal it) but then you potentially make the page slower and/ or increase bandwidth usage
There is a risk that search engines will consider it spam but as no one outside of Google etc knows the exact algorythms used it is purely speculation on if it actually would or wouldnt.