This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
My solution to this was to have the custom tag introduce enclosing <div>s which the javascript will lookup via getElementById() and adjust the style tag appropriately (if this weren't so trivial, then I would include the code). The problem I'm finding with this is that some HTML tags don't permit a nested <div>. For instance, I wanted to conditionally display combo-box options (<select><option>...</select>), but it is against the standard to use a <div> in the immediate nested scope of a <select>. Likewise, I wanted to conditionally display <table> rows, but it is against the standard to nest a <div> within a <table>.

Is there any general solution to this for all tags? Or will I need to handle cases like the above individually? Is there a "special" HTML tag which is valid at any nested scope and to which styles can be applied?
Author and ninkuma
Posts: 66424
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need divs? The display property can be adjusted for any element.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!