jQuery code to hide table rows with empty td element

Find jQuery code to hide those table rows (<tr>) which have at least one or more <td> element as empty or with no value. To hide table rows, iterate through all the td element and check it's text. If it is empty then hide it's parent (which is tr) using .hide().

Related Post:
$(document).ready(function() {
    $("#gdRows tr td").each(function() {
        var cellText = $.trim($(this).text());
        if (cellText.length == 0) {
            $(this).parent().hide();
        }
    });
});​
See result below


See Complete Code
Feel free to contact me for any help related to jQuery, I will gladly help you.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..