How can I remove a item/s from an Array
in JavaScript ?
function restructureChatBoxes() {
align = 0;
for (x in chatBoxes) {
chatboxtitle = chatBoxes[x];
if ($("#chatbox_"+chatboxtitle).css('display') != 'none') {
if (align == 0) {
$("#chatbox_"+chatboxtitle).css('right', '20px');
} else {
width = (align)*(225+7)+20;
$("#chatbox_"+chatboxtitle).css('right', width+'px');
}
align++;
}
}
}
And I want to remove the Chatbox when its closed from the List.
function closeChatBox(chatboxtitle) {
//HERE THE REMOVE FROM LIST ?
$('#chatbox_'+chatboxtitle).css('display','none');
restructureChatBoxes();
$.post("chat.php?action=closechat", { chatbox: chatboxtitle} , function(data){
});
}
Thanks for all Answers.