jQuery | If field is empty - hide previous wrap DIV (parent)

// with jquery-1.9.1.js $(function() { $('.tips_txt').each(function() { if ($.trim($(this).html()) === '') $(this).parents('.tips').hide(); }); });
If field is empty - hide previous wrap DIV

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.