jQuery :targetSelector

jQuery 选择器jQuery Selector

Definition and Usage

The :target selector selects the target element represented by the formatted identifier of the document URI.

Tip:If the document's URI contains a formatted identifier or hash, then the :target selector will match the element whose ID matches the identifier. For example, given the URI http://example.com/#foo, then $( "p:target" ) will select <p id="foo"> element.



Syntax

$( ":target" )


jQuery 选择器jQuery Selector

Other Extensions