/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery.fn.toggleText = function(a, b) { return this.each(function() { jQuery(this).text(jQuery(this).text() == a ? b : a); }); };
URL: http://dev.jquery.com/ticket/1092