Created
May 25, 2011 07:07
-
-
Save ryanseddon/990489 to your computer and use it in GitHub Desktop.
Marqeeeeeeeeeeeeeeeeeeeeeeee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Because the world needs more marquee's | |
if(!''.marquee) { | |
String.prototype.marquee = function() { | |
return '<marquee>' + this + '</marquee>'; | |
} | |
} | |
"OMG".marquee(); |
Should be this
, not the str
argument.
Also, you could simplify the if
check to if (!''.marquee)
.
if (!''.marquee) {
String.prototype.marquee = function() {
return '<marquee>' + this + '</marquee>';
}
}
thanks @mathiasbynens you've fixed my stupidity.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get "undefined" in Chrome 13.0.772.0 dev-m