Make HTML content not react on search (Ctrl+F)

后端 未结 7 2165
春和景丽
春和景丽 2021-01-01 07:12

In my web app I have a layer with a static HTML content that displays a text.

When I do a search on a page (ctrl+F) and type some text that is contained in the layer

7条回答
  •  感情败类
    2021-01-01 07:33

    Disable-CTRL-F-jQuery-plugin

    How to use:

    Include jQuery and disableFind.js.

    
    
    

    Call the disableFind() function on the element(s) you want to make unsearchable.

    $('p').disableFind();               // make all paragraphs unsearchable
    
    $('.unsearchable').disableFind();   // make all elements with "unsearchable" class unsearchable
    
    $(body).disableFind();              // make all text on page unsearchable
    

提交回复
热议问题