mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
docs snippets: a few more minor tweaks (#28225)
* Remove extra comma. * Use curly braces in snippet.
This commit is contained in:
@@ -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 %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user