wigglesby Posted November 25, 2009 Share Posted November 25, 2009 Hi I have a div (<div id="box info>") which has a unordered list of data retrieved from the db. If there is no data, then the div will display with an empty <ul></ul> and no <li< tags. I want some jQuery that will hide the <div id="box info"> if there are no <li> tags within it. Is this possible? Quote Link to comment Share on other sites More sharing options...
JustLikeIcarus Posted November 25, 2009 Share Posted November 25, 2009 First I would remove the space from your id attribute. Make it box_info or something. Then for the jQuery... $('#box_info:not(:has(li))').hide(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.