xxxxxxxxxx
var functionIsRunning = false;
function myFunction() {
if (!functionIsRunning) {
functionIsRunning = true;
}
}
xxxxxxxxxx
function getdata(){
var cityName = document.getElementById('data').value;
fetch("https://api.openweathermap.org/data/2.5/weather?q=karachi&appid=fe09716e3af279e3e7bcc6c136b6f6a2")
.then((response) => {return response.json();
})
.then(data => {
console.log(data);
})
xxxxxxxxxx
function add_color () {
add_filter( 'wp_nav_menu_objects', 'Flynt\add_color' );
acf.add_filter('color_picker_args', function( args, field ){
// do something to args
args.palettes = ['#5ee8bf', '#2f353e', '#f55e4f']
// return
return args;
});
}