This article mainly introduces the visible selector usage in jQuery. The example analyzes the functions, definitions, and matching operation skills of the visible selector, which has some reference value, for more information, see the examples in this article. Share it with you for your reference. The specific analysis is as follows:
This selector can match all currently visible elements.
Syntax structure:
The code is as follows:
$ (": Visible ")
This selector should also be used with other selectors, such as class selector and element selector. For example:
The code is as follows:
$ ("P: visible" ).css ({color: "blue "})
The above code sets the font color in the visible p element to blue.
If it is not used with other selectors, the default state is used with the * selector. for example, $ (": visible") is equivalent to $ ("*: visible ").
Instance code:
Instance 1:
The code is as follows:
Foot home