JQuery how to hide whole div and containing table when href is null or empty
Hi,
I have below structure:-
- '<div class="LinksDiv" style="display: inline-block;width: 400px;">' + '<div><table><tr><td><a href=' + (LinkDictionary[linkKey])[0].Url + '> <img src=' + (LinkDictionary[linkKey])[0].ImageUrl + '></img></a></td>' + '<td><a href=' + (LinkDictionary[linkKey])[0].Url + '>' + (LinkDictionary[linkKey])[0].Title + '</a></td></tr></table></div>' + '<div><table><tr><td><a href=' + (LinkDictionary[linkKey])[1].Url + '> <img src=' + (LinkDictionary[linkKey])[1].ImageUrl + '></img></a></td>' + '<td><a href=' + (LinkDictionary[linkKey])[1].Url + '>' + (LinkDictionary[linkKey])[1].Title + '</a></td></tr></table></div>' + '<div><table><tr><td><a href=' + (LinkDictionary[linkKey])[2].Url + '> <img src=' + (LinkDictionary[linkKey])[2].ImageUrl + '></img></a></td>' + '<td><a href=' + (LinkDictionary[linkKey])[2].Url + '>' + (LinkDictionary[linkKey])[2].Title + '</a></td></tr></table></div>' + '</div>';
Table inside a div. What I am looking for is how can I hide the whole Div and the containing table when (LinkDictionary[linkKey])[0].Url is null or empty. It should only hide the the div and containing table whose (LinkDictionary[linkKey])[0].Url is empty others should show up any idea?
Thanks,