can't add class on a string with integer.

can't add class on a string with integer.

coolapoohcoolapooh Posts: 1Questions: 1Answers: 0
edited April 2022 in Free community support
"createdRow":
                function( row, data, dataIndex ) {
                   
//this part is working fine
                   if ( data[4] == 'open') {
                        // console.log('yes');        
                        $(row).addClass('certainValue');
                    }

// this is my problem where string has integers which is not working
                    if ( data[1] == 'RD064921' ) {
                        console.log('yes');        
                        // $(row).addClass('certainValue1');
                    } 
                    
                }

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    It seems to be working here - look at the second row in the table. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

Sign In or Register to comment.