You cannot hide child elements using the inline style for the parent element, so use display: none; for your children, you donβt need an inline style for this
.hero-content > div.title, .hero-content > div.description { display: none; }
Or if you are going with a jQuery solution, than add a class to the parent element and use the selector below.
.hide_this > div.title, .hide_this > div.description { display: none; }
Now add the .hide_this class to the parent using jQuery.
$(".hero-content").addClass("hide_this");
Demo (using .addClass() )
Or if you're a fan of inline style than here, you go
$(".hero-content .title, .hero-content .description").css({"display":"none"});
Demo 2
source share