How can I edit a css rule in jQuery?
Posted
by
chacham15
on Stack Overflow
See other posts from Stack Overflow
or by chacham15
Published on 2011-11-22T09:28:44Z
Indexed on
2011/11/22
9:50 UTC
Read the original article
Hit count: 303
The purpose is that rows are dynamically added to a table and it is not as nice (and slower) to apply the rule manually later.
The specific example is that I am creating a tree table to represent a folder directory. Each folder is a div
. In each div
, there is a ul
with an li
for each columns' information. These li
have a class name equivalent to the column name. This provides column width. I want to make the columns resizable however. I could do $('.className').css('width', newWidth)
but then this wont apply to newly inserted items. Therefore, I want to modify the css rule. How do I do this?
© Stack Overflow or respective owner