On Dec 15, 3:48 pm, "Michael Geary" <m...@mg.to> wrote: > > > I'm not sure if it's the best solution, but a friend of > > > mine helped me overcome the issue i was experiencing. > > > We added a line of CSS to hidetreeviewon load, and then set > > > it to display in the demo.js file once everything was loaded > > > $("#browser").treeview({ > > > animated: "fast", > > > persist: "cookie", > > > collapsed: true > > > }).css('display','block'); > > Hey Andrew, nice patch. I've been bothered by that flash for > > a while now. I wonder how that will effect SEO .. I'm using > > treeview for my main content navigation. Do you think the > > bots and crawlers will trigger the display:block call, or > > will the hidden treeview remain hidden? And what about > > visitors with js disabled? The nav will be hidden completely. > > Anyone know of another way to stop the expanded flash glitch? > > Instead of putting the CSS directly in the <head>, use document.write to > insert it. That way it won't have any effect if JS is disabled or if a > crawler reads the page. > > IOW, where you might have this in the <head>: > > <style type="text/css"> > #browser { display:none; } > </style> > > Replace it with: > > <script type="text/javascript"> > document.write( > '<style type="text/css">', > '#browser { display:none; }', > '</style>' > ); > </script> > > -Mike
Nice one Mike, that's a smart workaround. Thanks :)