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
Post a Comment