• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How to change stylesheet directly?

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day!

My original problem was how to make the hiding or my elements faster.
I was directed to post my problem to this forum.

https://coderanch.com/t/259491/Applets/java/Applet-speed-up-hiding-elements

And Ulf's suggestion was:
There are ways to change the stylesheet directly, so that all elements that are part of a particular class are changed all at once.

How can I do this?

Thanks.
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Much more common, is changing the class of a root element to effect a change of multiple elements without having to change the class of each one.

For example, let's say that you wanted to hide all images on a page. Rather than finding and hiding all the images, just put the class hiddenImages on the <body> tag and have CSS rule:



Remove the class to make them re-appear.
[ June 29, 2008: Message edited by: Bear Bibeault ]
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic