query() is like doing a jquery selection, it emulates a “selector” script in the query. If more than one result is found by the query, the rest of the code applies to all of them.
.css() changes a single CSS property, in this case text-align.
For optimization’s sake, if you have more than one of these, you could simply make a separate script with the “.data .DESCRIPTION_ENG” selector with a single line of code:
A class name cannot contain a space in valid CSS. What you have there is an element that actually has 2 classes applied to it, so in your stylesheet, there’s probably one data{} entry and one DESCRIPTION_ENG {} entry.
Technically you could just do query(“.DESCRIPTION_ENG”) and that would work fine (unless description_eng is used in anything else than instances of that element).
As for the space, yes you’re right, it wouldn’t work in your case. The space means “Descendant of”, so it would look for an element that has the description_eng class only when it’s a descendant (is contained within) an element that has the data class.
Even though we don’t actually use jQuery for our API, it’s still really, really close to it in terms of features. Take a look at the jQuery Selectors page for more information.