javascript - jQuery - If none of 3 id's have content hide this -


I have drawing content of 3 div in the database in the database:

   

If there is no data from these three divs, can I add some jQuery to hide another device?

Thanks, Jack

I think it's better on server side Will be handled, because you probably would like it to work for people who have javascript disabled are okay.

If it should be in jQuery, then you can do something like this:

  $ (function () {if ($ ("# one"). Html ( ) == "" & amp; $ ("# 2"). Html () == "" & amp; $ ("#three"). Html () == "") {$ ("#someOtherDiv"). Hide ();}}  

Comments

Popular posts from this blog

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

mysql - Can mysql_pconnect be called multiple times in one php page? -