File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -929,7 +929,7 @@ a class:
929
929
<div data-loading="removeClass(opacity-50)">...</div>
930
930
931
931
<!-- add multiple classes when loading -->
932
- <div data-loading="addClass(opacity-50 disabled )">...</div>
932
+ <div data-loading="addClass(opacity-50 text-muted )">...</div>
933
933
934
934
Sometimes you may want to add or remove an HTML attribute when loading. That
935
935
can be accomplished with ``addAttribute `` or ``removeAttribute ``:
@@ -939,8 +939,11 @@ can be accomplished with ``addAttribute`` or ``removeAttribute``:
939
939
<!-- add the "disabled" attribute when loading -->
940
940
<div data-loading="addAttribute(disabled)">...</div>
941
941
942
- <!-- add an attribute and its value -->
943
- <div data-loading="addAttribute(style='color: red')">...</div>
942
+ .. caution ::
943
+
944
+ The ``addAttribute() `` and ``removeAttribute() `` functions only work with
945
+ empty HTML attributes (``disabled ``, ``readonly ``, ``required ``, etc.) and
946
+ not with attributes that define their values (e.g. this won't work: ``addAttribute(style='color: red') ``).
944
947
945
948
You can also combine any number of directives by separating them with a
946
949
space:
You can’t perform that action at this time.
0 commit comments