The visibility selector of the jQuery selector. The jquery selector is visible.
<! DOCTYPE html>
Function show (ele) {if (ele instanceof jQuery) {// if it is a jQuery element $ ("# show "). append ('element length = '+ ele. length) // display "element length = (number of ele. s)"} else {// if it is not a jQuery element alert (ele + 'not a jQuery object')} execution result: element length = 0 element length = 0 element length = 1 element length = 1 element length = 1 element length = 0 show ($ ("# div1: visible "); // the CSS display value of div1 is none. Therefore, the visible element cannot be obtained and the result is 0 show ($ (" # div2: visible ")); // The width and height of div2 are both explicitly set to 0, so the visvisible element cannot be obtained and the result is 0 show ($ ("# div3: visible ")); // div3 visibility: hidden or opacity: 0 is considered visible because they still occupy space layout. Result 1 show ($ ("# div1: hidden ")); // This element is hidden, and a hidden element is obtained. Result 1 show ($ ("# div2: hidden"); // This element is hidden, obtain a hidden element. Result 1 show ($ ("# div3: hidden"); // The element is visible and cannot be obtained. The result is 0.