Note that there are some explanatory texts on larger screens.

plurals
  1. POIssues with Bootstrap after using jquery.removeClass
    primarykey
    data
    text
    <p>I'm encountering following problem with the twitter bootstrap framework and jQuery: I have the following form (simplified, the real form is built with cakephp's formhelper and has a lot more classes and ids):</p> <pre><code>&lt;form class="form-horizontal"&gt; &lt;div class="control-group"&gt; &lt;label class="control-label" for="input01"&gt;Name&lt;/label&gt; &lt;div class="controls"&gt; &lt;input type="text" class="input-xlarge" id="name"&gt; &lt;span class="help-block"&gt;Supporting help text&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="control-group"&gt; &lt;label class="control-label" for="input01"&gt;Description&lt;/label&gt; &lt;div class="controls"&gt; &lt;input type="text" class="input-xlarge" id="description"&gt; &lt;span class="help-block"&gt;Supporting help text&lt;/span&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>After server-side validation, i add the <code>.error</code> class to the respective control-group.</p> <p>now for example the validation for name is ok, but it fails for description, the description control-group gets the error class and is displayed correctly (red, standard bootstrap). but the name input field is red, too. i checked the source code and the name's control-group has no <code>.error</code> class. what confuses me, is, that only the input field is display with the red border, the appropriate label tag is displayed correctly (default color).</p> <p>Here's a screenshot for clearer understanding. </p> <p><img src="https://i.stack.imgur.com/Xrd6U.png" alt="my_problem"></p> <p>Check it in Chrome and Firefox, so i can exclude a browser bug. I also added and removed the class manually in chromes developer tool thing and it worked as intended. why is that? does anyone have a solution to this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload