JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<div class="dynamic">
This text is hidden if another div contains the word "download"
</div>
<div class="something">
<div class="btn-download">
If this text has the word download the div with class "dynmaic" is hidden
</div>
</div>
JavaScript
jQuery(document).ready(function($){
if ( $('.btn-download').text().indexOf("download") !== -1) {
$('.dynamic').hide();
}
});