if (typeof(this.data('user')) !== 'undefined') {
user = this.data('user');
} else {
- this.placeholder('x');
+ this.imageplaceholder('x');
return;
}
}
if (typeof(result) === 'object') {
if (!hidedefault) {
if (result.data && result.data.displayname) {
- $div.placeholder(user, result.data.displayname);
+ $div.imageplaceholder(user, result.data.displayname);
} else {
- $div.placeholder(user);
+ $div.imageplaceholder(user);
}
} else {
$div.hide();
*
* And call this from Javascript:
*
- * $('#albumart').placeholder('The Album Title');
+ * $('#albumart').imageplaceholder('The Album Title');
*
* Which will result in:
*
*
* You may also call it like this, to have a different background, than the seed:
*
- * $('#albumart').placeholder('The Album Title', 'Album Title');
+ * $('#albumart').imageplaceholder('The Album Title', 'Album Title');
*
* Resulting in:
*
*/
(function ($) {
- $.fn.placeholder = function(seed, text) {
+ $.fn.imageplaceholder = function(seed, text) {
// set optional argument "text" to value of "seed" if undefined
text = text || seed;