Shorten optional text-argument processing

This commit is contained in:
kondou 2013-09-25 17:19:38 +02:00
parent 24eb41548e
commit 5e7a7b3f61
1 changed files with 2 additions and 3 deletions

View File

@ -48,9 +48,8 @@
(function ($) {
$.fn.placeholder = function(seed, text) {
if (typeof(text) === "undefined") {
text = seed;
}
// set optional argument "text" to value of "seed" if undefined
text = text || seed;
var hash = md5(seed),
maxRange = parseInt('ffffffffffffffffffffffffffffffff', 16),