Update I removed the env
code and I'm still receiving 6 ESLint errors with my code and I'm not sure why.
Here are the errors:
ERROR: 'window' is not defined. [no-undef] if ($(window).width() <= 640) {
ERROR: 'initMap' is defined but never used. [no-unused-vars] function initMap() {
ERROR: 'google' is not defined. [no-undef] var map = new google.maps.Map(document.getElementById("map"), {
ERROR: 'document' is not defined. [no-undef] var map = new google.maps.Map(document.getElementById("map"), {
ERROR: 'marker' is assigned a value but never used. [no-unused-vars] var marker = new google.maps.Marker({
ERROR: 'google' is not defined. [no-undef] var marker = new google.maps.Marker({
Any help would be appreciated!
/*eslint-env jquery*/
if ($(window).width() <= 640) {
$(".cross").hide();
$(".menu").hide();
$(".hamburger").show();
$(".hamburger").on("click", function () {
$(".menu").slideToggle("slow");
$(".hamburger").hide();
$(".cross").show();
});
$(".cross").on("click", function () {
$(".menu").slideToggle("slow");
$(".cross").hide();
$(".hamburger").show();
});
}
function initMap() {
var pip = {
lat: 22.421645,
lng: -98.731555
};
var map = new google.maps.Map(document.getElementById("map"), {
zoom: 13,
center: pip,
});
var marker = new google.maps.Marker({
position: pip,
map: map
});
}