This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Set css values dinamically pressing buttons

 
Dura Hurtado
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, which I am trying to do is as follows, and I don´t know if it is possible, well the thing is that I would like build a .css dinamically,

I mean load a .css with the properties reset, and be able to set color=red, pressing a button, using a back bean like in JSF, that way I would write 'red' in an input text(#{Content.color}) in the .xhtml file, and would retrieve the value from the .css the same way using jquery

I know the question is a little confusing but I am googling about it but I haven´t clear my ideas about.


¿Any clue?

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't tell what you are actually asking, and bringing in JSF-specific concepts in this forum will not be helpful, but you can dynamically add styles to elements, as well as change their class list with jQuery. These are the supported ways of changing the styles of elements.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic