How can I combine a text string with a variable for use as an array index?
For example, on this line from the code below:
$('.flip[id="item-3"]').fadeOut( 1500);
how do I do something like: $('.flip[id="item-" + id]').fadeOut( 1500);
To make this div fade away: < div id="item-3" class="flip">?
$( ".delete" ).click(function() {
var $this = $(this), id = $this.data('id');
$.ajax({
method: "post",
url: "charts_manage.php",
data: { id: id, do: 'delete' },
success: function( data ) {
$('.flip[id="item-3"]').fadeOut( 1500);
}
});
});