I had array of div id i need to close all that div. i had used code below. not works. how to do this.
$.each([id_1, id_2], function(index, value) {
//alert(index + ': ' + value);
$("#"+value).css({'display' : 'none'});
});
i need to pass id dynamically as $("#"+id_value)
You can use the
Array joinmethod as follows:You can see a working demo here: http://www.jsfiddle.net/qHVg7/