homepage Welcome to WebmasterWorld Guest from 54.145.182.50
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Hiding list with javascript -- bad for Google?
DarkNova

5+ Year Member



 
Msg#: 3463313 posted 1:05 am on Sep 28, 2007 (gmt 0)

I'd like to add a UL list to a page using CSS and javascript to allow the user to expand and collapse the nodes in the list. The list itself will just be a normal UL/LI HTML list and there will be CSS classes for both expanded and collapsed nodes. The CSS class for a collapsed node is basically defined as "display: none".

I would like the list to be collapsed by default so that a user has to click to expand the list if they want to see all the subitems, in order to cut down on clutter, however, I would still like Googlebot to index the subitems in the list.

I was thinking about doing this by having a javascript load with the page and setting the style of the nodes to the collapsed style (display: none). First of all, will this cause Googlebot to not like my site? I wouldn't think so, as this seems like a valid navigational technique used by lots of sites, but I want to make sure. Also, will this actually do what I'd like, or will Google see that the javascript is hiding the nodes by default and therefore never index them? Thanks for any help.

 

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3463313 posted 2:19 am on Sep 28, 2007 (gmt 0)

This is a very common kind of scripting for the divs in dhtml menu systems. If the list contains directly readable html links - not generated by a script but the urls are right there in the page's source code - then there is no problem with using a js to switch CSS display rules.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved