Directly accessing $.fn.init
is not a good idea, and should be avoided. Given the goal you describe in the comments (copied below) there is an alternative.
I would like to get the innerhtml of the visible element so I can have a more specific search result
In this case you can supply another condition in the function you provide to filter()
which checks for the presence of a specific word. Something like this:
let term = 'dolor';
let $matches = $(".definition").children().filter(function() {
return $(this).is(":visible") && $(this).text().toLowerCase().includes(term.toLowerCase());
}).addClass('match');
.match { color: #C00; }
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="definition">
<p>Lorem ipsum dolor sit</p>
</div>
<div class="definition">
<p>Ipsum dolor sit amet</p>
</div>
<div class="definition">
<p>Foo bar fizz buzz</p>
</div>
<div class="definition">
<p>Dolor sit amet consectetur</p>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…