jQuery - セレクタのサンプルが含まれています

jQuery –セレクターの例を含む

jQuery contains(text) selectorは、指定されたテキストを含むすべての要素を選択するために使用されます。

Examples
1。 $(‘p:contains(paragraph 1)’) – selects all elements matched by

that contains the text “paragraph 1”.
2. $(‘p:contains(example)’) – selects all elements matched by

that contains the text “example”.
3. $(‘li:contains(three)’) – selects all elements matched by

  • that contains the text “three”.

  • プレイする

    ボタンをクリックして、含まれているセレクターを再生します。

    
    
    jQuery contains selector example
    
    
    
    
    
    
    
    
    

    jQuery contains selector example

    • One
    • two
    • three
    • four
    • five

    This is a paragraph 1 - google.com

    This is a paragraph 2 - example.com



    Button clicked : " + str + "

    "); });