Created
May 6, 2011 12:10
-
-
Save terkel/958842 to your computer and use it in GitHub Desktop.
米印 (※) を検出
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
(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); |
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
(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