سؤال

I'd like to apply background color css to text in a datatable cell. Currenytly I can only apply the color to the whole cell, how can I apply it only to the text in the cell? Here is what I am using now:

$.each(aData, function(ii,value2){
          if (value.sTitle == "Priority" && aData[i] != ""){
              $('td:eq(' + i + ')', nRow).css('background-color', '#F6CED8');
            }   
        }); 
هل كانت مفيدة؟

المحلول

Like the other user said. Put it inside div or p tags and change the background color of that specific object.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top