jQuery select and apply style -


i have table lot of td cells. each of cells might have 1 or more divs inside. need take first inner div's inline style , move it parent td's style.

how can done in jquery?

this simple:

$('td div').each(function() {   $(this).closest('td').attr('style', $(this).attr('style')); }); 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -