Skip to content

Instantly share code, notes, and snippets.

@terkel
Created May 6, 2011 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terkel/958842 to your computer and use it in GitHub Desktop.
Save terkel/958842 to your computer and use it in GitHub Desktop.
米印 (※) を検出
(function ($) {
$.fn.kome = function () {
var regex = /^[\s\u3000]*(\u203B)[\s\u3000]*/;
return this.each(function () {
var $this = $(this),
html = $this.html().replace(regex, '<span class="kome">$1</span>');
$this.html(html);
});
};
})(jQuery);
(function(a){a.fn.kome=function(){var c=/^[\s\u3000]*(\u203B)[\s\u3000]*/;return this.each(function(){var b=a(this),d=b.html().replace(c,'<span class="kome">$1</span>');b.html(d)})}})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment