mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-29 04:54:12 +03:00
Standardized hints while providing backwards compatibility on data-hint
This commit is contained in:
parent
2d52fc271c
commit
36896a585b
|
@ -506,7 +506,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control floating-label" placeholder="old floating label" data-hint="old hint attribute">
|
||||
<input type="text" class="form-control floating-label" placeholder="old floating label" data-hint="This is a hint using a <code>data-hint</code> attribute on the input">
|
||||
</div>
|
||||
|
||||
<h2>Textarea</h2>
|
||||
|
|
|
@ -78,9 +78,9 @@
|
|||
console.error("Expected form-group for input", $this);
|
||||
}
|
||||
|
||||
if (!$this.attr("data-hint") && !$this.hasClass("floating-label")) {
|
||||
return;
|
||||
}
|
||||
//if (!$this.attr("data-hint") && !$this.hasClass("floating-label")) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
$this.after("<span class=material-input></span>");
|
||||
|
||||
|
@ -91,9 +91,10 @@
|
|||
$this.after("<div class=floating-label>" + placeholder + "</div>");
|
||||
}
|
||||
|
||||
// Add hint label if required
|
||||
|
||||
// Add hint label if using the shorthand data-hint attribute on the input
|
||||
if ($this.attr("data-hint")) {
|
||||
$this.after("<div class=hint>" + $this.attr("data-hint") + "</div>");
|
||||
$this.after("<p class='help-block hint'>" + $this.attr("data-hint") + "</p>");
|
||||
}
|
||||
|
||||
// Set as empty if is empty (damn I must improve this...)
|
||||
|
|
Loading…
Reference in New Issue
Block a user