Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
31
rated 0 times [  33] [ 2]  / answers: 1 / hits: 17900  / 14 Years ago, fri, february 25, 2011, 12:00:00

Here is my code, my question is in the comment:



function (align) {    
var column = $(`'<td>'`);
// now i need syntax to set align property to this td element
// column.align = align (not working)
}


As shown, column.align = align is not working.



Where am I going wrong?


More From » jquery

 Answers
100

it seems you're using jQuery, so you can do something like :



column.attr('align', 'right');

[#93583] Wednesday, February 23, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
darrylm

Total Points: 499
Total Questions: 131
Total Answers: 108

Location: Saudi Arabia
Member since Mon, Sep 5, 2022
2 Years ago
;