saveAs( new Blob( rows, {type : 'text/csv'}), 'data.csv' );
saveAs( new Blob( rows, {type : 'text/csv;charset=utf-8'}), 'data.csv' );
pricesPerMonth
- это объектvar pricesPerMonth = {"1": 1500,"2": 2000,"3": 1500,"4": 2000,"5": 1500,"6": 2000,"7": 1500,"8": 2000,"9": 1500,"10": 2000,"11": 1500,"12": 2000};
<div class="array none">{"1": 1500,"2": 2000,"3": 1500,"4": 2000,"5": 1500,"6": 2000,"7": 1500,"8": 2000,"9": 1500,"10": 2000,"11": 1500,"12": 2000}</div>
var pricesPerMonth = $('.array').text();
cache: false
function getajax(){
$.ajax({
type: "GET",
url: window.wp_data.ajax_url,
cache: false,
data: {
action: 'do_something',
postid: <?php echo $post_id; ?>
},
success: function (response) {
$('.ajax').html(response);
}
});
}
var mdate = new Date();
// document.write(mdate.getFullYear());
document.getElementById('my_span_tag').innerHTML = mdate.getFullYear();
<span id="my_span_tag"></span>
function scrollToMap() {
var map = $('.geography--contacts');
var buttons = $('.geography__area--target').add('.geography__target');
if ( $('.page').outerWidth() <= 768 ) {
map = $('.geography__map');
}
buttons.on('click', function() {
$('html, body').animate({
scrollTop: map.offset().top - 100
}, 500);
});
return false;
}
function openModal(res) {
contentString = '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<div><b>Place: </b><span id="place"> ' + res.name + '</span> </div>'+
'<p><b>Weather:</b> <span id="weather">' + res.weather[0].main + '</span></p>'+
'<p><b>Temp:</b> <span id="temp">' + (res.main.temp - 273) +'</span>° K</p>'+
'<p><b>Wind speed:</b> <span id="wind">' + res.wind.speed + '</span> ms</p>'+
'<p><b>Humidity:</b> <span id="humidity">' + res.main.humidity + '</span>%</p>'+
'</div>';
infowindow = new google.maps.InfoWindow({
content: contentString
});
infowindow.open(map, marker);
}