Forum Moderators: Robert Charlton & goodroi
What is Google’s latest view on using CSS display:none; with a JavaScript onclick event handler to display the main page content within a page.
This would be used with an introduction type scenario with a ‘read more’ onclick link that would be displayed on the same URL.
It was my stance that using such commands should only be used with the following two points:
1)The content is accessible both without JS enabled.
2)There should be a good reason for hiding the content.
Above all my golden rule was not to use these methods in the main body of page content. However my current situation challenges this theory.
Would it now be regarded as a structurally sound way to display optimised page content through an onclick event handler, or would old spammer flag still be raised.
I guess my question is, has Googlebot matured to a level where it can understand proper use of this CSS and JS without dishing out harsh penalties?
Whenever such functionality is required, I always make sure that with javascript disabled (but CSS enabled) the content displayed - i.e. hide the content with javascript, not with a CSS rule interpreted by non-js browsers.