Shorten optional text-argument processing
This commit is contained in:
parent
24eb41548e
commit
5e7a7b3f61
|
@ -48,9 +48,8 @@
|
||||||
|
|
||||||
(function ($) {
|
(function ($) {
|
||||||
$.fn.placeholder = function(seed, text) {
|
$.fn.placeholder = function(seed, text) {
|
||||||
if (typeof(text) === "undefined") {
|
// set optional argument "text" to value of "seed" if undefined
|
||||||
text = seed;
|
text = text || seed;
|
||||||
}
|
|
||||||
|
|
||||||
var hash = md5(seed),
|
var hash = md5(seed),
|
||||||
maxRange = parseInt('ffffffffffffffffffffffffffffffff', 16),
|
maxRange = parseInt('ffffffffffffffffffffffffffffffff', 16),
|
||||||
|
|
Loading…
Reference in New Issue