I have a questionnaire that users need to complete. Each question is placed in the Appgini App Description Area (.help-block).
My problem is that the questionnaire is broken up into 3 sections. Each section header, containing info about the section, is also shown as a read-only description field.
The client has requested that each section HEADER is a color other than the default alert-info blue (the questions themselves stay as is). I can change ALL of the descriptions/help blocks easily easily enough by adding a new class to span.help-block like so:
<script>
$j(document).ready(function() {
$j("span.help-block").addClass("in").find(".alert-info").removeClass("alert alert-info").addClass("alert alert-warning");
});
</script>
But what I can't do, despite my best efforts, is change a single help block to, say, alert.alert-warning without changing all the others. Can someone please help me with this?
Thx so much.
Styling bootstrap help-block description color
Styling bootstrap help-block description color
Roses are red, Violets are blue, unexpected '}' on line 32
Re: Styling bootstrap help-block description color
* please put code in [ code ] ... [ /code ] tags for better readability.
Could work for the first help-block like this.
Change n for the other help blocks.
Could work for the first help-block like this.
Code: Select all
<script>
$j(document).ready(function() {
$j("span.help-block").addClass("in");
// selector :eq(n) is your friend
// n is the zero-based index
$j(".help-block.alert-info:eq(0)").removeClass("alert-info").addClass("alert-warning");
});
</script>
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Styling bootstrap help-block description color
Jan, you are an absolute legend, as always.
Thank you very much for this. Works perfectly.
Thank you very much for this. Works perfectly.
Roses are red, Violets are blue, unexpected '}' on line 32