Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery.fn.println = function() {
- // Join all the arguments into a space-separated string
- var msg = Array.prototype.join.call(arguments, " ");
- // Loop through each element in the jQuery object
- this.each(function() {
- // For each one, append the string as plain text, then append a <br/>.
- jQuery(this).append(document.createTextNode(msg)).append("<br/>");
- });
- // Return the unmodified jQuery object for method chaining
- return this;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement