Not able to hide div if it conatin text : Hello Everyone I need help I have two div inside li and two buttons I want to hide button if second_div class div is present or it contain text please help I have tried various solution hasclass not working



    <li>
    <div class="first_div"></div>
    <button></button>
    <div class="second_div"></div>
    </li>

    <script type="text/javascript">
    if( jQuery(".second_div").is(':empty') ){
    	if(jQuery( this ).hasClass( "second_div" )){
    		jQuery(" .button").css("display":"none");
    	}
    	//jQuery("ul.products li.product .button").css("display":"none");
    }
    </script>