If the variable name of ul's id is ulid.
$ ("Li", "#"? +? ulid)。 css("background-color "," # CCC "); This uses jquery's selector rule $(selector 1, content).
Selector 1 is a selector. The content can be a selector, a jquery dom object, or a local dom object. In the code above, the content is a selector.
This means to select all the elements in the content that meet the selector 1. In the above code, it means "select all the li elements in ul whose id is the variable value of ulid".
The method. Css(name, value) is to change the css attribute named name to value, and if there is a numerical unit, the unit can be omitted. For example, the value of padding 30px can be written directly as. css("padding ",30)。
. Css(name) is to get the CSS attribute value with the name value. For example, Css("padding ") returns padding values without units, for example. Css("padding ") returns 30.