Created
July 14, 2015 16:12
-
-
Save chuck0523/7966788127e2e08eafe2 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
$('.font-box').click(function(){ | |
//一度カンマを外す | |
var text = $('#fixedTextarea').text().replace(/","/g, '""'); | |
$(this).toggleClass('selected'); | |
var fontText = '\"' + $(this).text() + '\"'; | |
if($(this).hasClass('selected')) { | |
text += fontText; | |
} else { | |
text = text.replace(fontText, ''); | |
} | |
text = text.replace(/""/g, '","'); | |
$('#fixedTextarea').text(text); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment