Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. jQuery.fn.println = function() {
  2. // Join all the arguments into a space-separated string
  3. var msg = Array.prototype.join.call(arguments, " ");
  4. // Loop through each element in the jQuery object
  5. this.each(function() {
  6. // For each one, append the string as plain text, then append a <br/>.
  7. jQuery(this).append(document.createTextNode(msg)).append("<br/>");
  8. });
  9. // Return the unmodified jQuery object for method chaining
  10. return this;
  11. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement