0

Bootstrap has its own javascript version of checkboxes, radio buttons, collapse etc.

Example radio buttons:

<div class="btn-group" data-toggle="buttons-radio">
  <button type="button" class="btn">Left</button>
  <button type="button" class="btn">Middle</button>
  <button type="button" class="btn">Right</button>
</div>

This looks pretty great as long you have JS enabled. I like JS but I am also a NoScript user and I want that the page is also functional without JS.

As I can see twitter-bootstrap has no built-in fallback solution. I could use my own tags or show the bootstrap buttons only if JS is enabled but I somehow expected that bootstrap could handle this.

Only solution I have in mind is using standard radio buttons, checkboxes etc. and replacing/hiding them with some like code from above if JS is enabled.

I was also disappointed to see that some simple things like collapse have no fallback solution which would at least i.e. handle it with css3 transistions or at least just open all sub divs and keep them open.

Do you have some ideas/solutions for bootstrap without JS or is the only solutions writing a function to "hide radio buttons, show/create boostrap-divs if javascript enabled"?

toktok
  • 279
  • 1
  • 5
  • 13

1 Answers1

0

You could handle it without javascript but that would require it to send it to a server side script or at least a form to submit it. As most user (I think about 99%) have javascript enabled, you should disable the function when no javascript is activated.

tobspr
  • 8,200
  • 5
  • 33
  • 46
  • I am not talking about validating a form but about how to make page still look good and functional without javascript and without writing a lot of double code – toktok Oct 22 '12 at 11:16
  • You could use the – tobspr Oct 22 '12 at 11:17
  • Of course I could. I will have to. But the question is did someone already handled this with bootstrap in a nice way, like with a fallback css i.e. nojs.css – toktok Oct 22 '12 at 11:27