$(document).on('click','#closeNewProductExpand', function() {
$('#newProductExpand').css('width', '0');
});
$(document).on('click', '#searchProduct', function() {
$('#newProductExpand').css('width', '0');
});
$(document).on('click', '#productsData', function() {
$('#newProductExpand').css('width', '0');
});
Here I want to set the width to 0 of #newProductExpand if one of the above 3 buttons is clicked.Is there any way to write this code rather than wasting such a larger space.I appreciate your help.Thanks