$arr = array();
$arr[] = array('text' => '1');
$arr[] = array('text' => '2');
$res = $arr;
$(document).on('click', '#get', function(e){
e.preventDefault();
var $content = $('#content');
if($content.is(':visible')){
$content.hide();
}
else{
$.ajax({
url: "download.php",
cache: false,
beforeSend: function(){
$content.html('<img src="img/ajax_load.gif">');
},
success: function(html){
$content.html(html);
}
});
}
});