javascript - jQuery - hide elements after specific text -
i want hide elements after specific text / last word of first div
<div class="top">here text</div> <table class="middle"> ... </table> <div class="bottom">...</div>
hide table(middle) , div(bottom) depending on word "text" first div
try
txtword = $('.top').text().split('text')[1] if(txtword){ alert("div show"); }else{ alert("div hide"); }
Comments
Post a Comment