]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
docs snippets: a few more minor tweaks (#28225)
authorXhmikosR <xhmikosr@gmail.com>
Mon, 11 Feb 2019 09:34:02 +0000 (11:34 +0200)
committerGitHub <noreply@github.com>
Mon, 11 Feb 2019 09:34:02 +0000 (11:34 +0200)
* Remove extra comma.

* Use curly braces in snippet.

site/docs/4.2/components/forms.md
site/docs/4.2/getting-started/javascript.md

index 94a868fad469d320f6df4ed39062e4e99ef54609..e655e21589e08a97833c35c7f214cb1efdd18847 100644 (file)
@@ -1125,7 +1125,7 @@ $form-validation-states: map-merge(
     "invalid": (
       "color": $form-feedback-invalid-color,
       "icon": $form-feedback-icon-invalid
-    ),
+    )
   ),
   $form-validation-states
 );
index 536a65d285f49fd67dbc899dd751c3ebaf25eee9..fc1f2c5a772899cbb5a7b2d206d1f7e3bb712a74 100644 (file)
@@ -50,7 +50,9 @@ All infinitive events provide [`preventDefault()`](https://developer.mozilla.org
 
 {% highlight js %}
 $('#myModal').on('show.bs.modal', function (e) {
-  if (!data) return e.preventDefault() // stops modal from being shown
+  if (!data) {
+    return e.preventDefault() // stops modal from being shown
+  }
 })
 {% endhighlight %}