I'm new to jQuery, when I applied jquery .css() method without using closest, it's working fine, but in case of closest same method is not working.
Please refer snippet:
//$('span').css("color","red");
$("body").delegate("button", "click", function () {
$(this).closest('span').css("color","red");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Click to change color of span</button>
<span> Me Span here</span>