Revision: 57479
Updated Code
at May 28, 2012 15:51 by StrawMan
Updated Code
//Colorize Portions Of String
$('div.tr_history_use_sub_div').each(function() {
var $text = $(this).text();
if($text.indexOf('+') >= 0) {
$(this).css({
'color' : 'green'
});
} else if($text.indexOf('-') >= 0) {
$(this).css({
'color' : 'red'
});
}
var go_pos = $text.search(/ゴールド/i);
var go_txt = $text.substr(go_pos, 4);
if(go_txt === 'ゴールド') {
var t = $(this).text();
t = t.replace(go_txt, '<span class="gold_black">ゴールド</span>');
$(this).html(t);
}
});
Revision: 57478
Updated Code
at May 28, 2012 15:50 by StrawMan
Updated Code
//Colorize particular results.
$('div.tr_history_use_sub_div').each(function() {
var $text = $(this).text();
if($text.indexOf('+') >= 0) {
$(this).css({
'color' : 'green'
});
} else if($text.indexOf('-') >= 0) {
$(this).css({
'color' : 'red'
});
}
var go_pos = $text.search(/ゴールド/i);
var go_txt = $text.substr(go_pos, 4);
if(go_txt === 'ゴールド') {
var t = $(this).text();
t = t.replace(go_txt, '<span class="gold_black">ゴールド</span>');
$(this).html(t);
}
});
Revision: 57477
Updated Code
at May 28, 2012 15:50 by StrawMan
Updated Code
//Colorize portions of string.
$('div.tr_history_use_sub_div').each(function() {
var $text = $(this).text();
if($text.indexOf('+') >= 0) {
$(this).css({
'color' : 'green'
});
} else if($text.indexOf('-') >= 0) {
$(this).css({
'color' : 'red'
});
}
var go_pos = $text.search(/����/i);
var go_txt = $text.substr(go_pos, 4);
if(go_txt === '����') {
var t = $(this).text();
t = t.replace(go_txt, '<span class="gold_black">����</span>');
$(this).html(t);
}
});
Revision: 57476
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 28, 2012 15:48 by StrawMan
Initial Code
//Colorize portions of string.
$('div.tr_history_use_sub_div').each(function() {
var $text = $(this).text();
if($text.indexOf('+') >= 0) {
$(this).css({
'color' : 'green'
});
} else if($text.indexOf('-') >= 0) {
$(this).css({
'color' : 'red'
});
}
var go_pos = $text.search(/ゴールド/i);
var go_txt = $text.substr(go_pos, 4);
if(go_txt === 'ゴールド') {
var t = $(this).text();
t = t.replace(go_txt, '<span class="gold_black">ゴールド</span>');
$(this).html(t);
}
});
Initial URL
Initial Description
Colorize Portions Of String
Initial Title
Colorize Portions Of String
Initial Tags
jquery
Initial Language
jQuery