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

http://jsfiddle.net/enqym/1/

txtword = $('.top').text().split('text')[1] if(txtword){ alert("div show"); }else{  alert("div hide"); } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -