Renamed current placeholder jquery plugin to imageplaceholder
This is to prevent conflicts with jquery libs that handle text placeholders in IE8
This commit is contained in:
parent
8c69a5388e
commit
9aa164f381
|
@ -60,7 +60,7 @@
|
||||||
if (typeof(this.data('user')) !== 'undefined') {
|
if (typeof(this.data('user')) !== 'undefined') {
|
||||||
user = this.data('user');
|
user = this.data('user');
|
||||||
} else {
|
} else {
|
||||||
this.placeholder('x');
|
this.imageplaceholder('x');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,9 +76,9 @@
|
||||||
if (typeof(result) === 'object') {
|
if (typeof(result) === 'object') {
|
||||||
if (!hidedefault) {
|
if (!hidedefault) {
|
||||||
if (result.data && result.data.displayname) {
|
if (result.data && result.data.displayname) {
|
||||||
$div.placeholder(user, result.data.displayname);
|
$div.imageplaceholder(user, result.data.displayname);
|
||||||
} else {
|
} else {
|
||||||
$div.placeholder(user);
|
$div.imageplaceholder(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$div.hide();
|
$div.hide();
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* And call this from Javascript:
|
* And call this from Javascript:
|
||||||
*
|
*
|
||||||
* $('#albumart').placeholder('The Album Title');
|
* $('#albumart').imageplaceholder('The Album Title');
|
||||||
*
|
*
|
||||||
* Which will result in:
|
* Which will result in:
|
||||||
*
|
*
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
*
|
*
|
||||||
* You may also call it like this, to have a different background, than the seed:
|
* 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:
|
* Resulting in:
|
||||||
*
|
*
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
(function ($) {
|
||||||
$.fn.placeholder = function(seed, text) {
|
$.fn.imageplaceholder = function(seed, text) {
|
||||||
// set optional argument "text" to value of "seed" if undefined
|
// set optional argument "text" to value of "seed" if undefined
|
||||||
text = text || seed;
|
text = text || seed;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue