var typed = new Typed("#typed", {
strings: ['Welcome to...', 'Hello!.', 'How are you?'],
onStop: (arrayPos, self) => {
console.log('onStop', arrayPos, self);
},
onStart: (arrayPos, self) => {
console.log('onStart', arrayPos, self)
}
});
var checkbox = document.querySelector("input[id=typstop]");
checkbox.addEventListener( 'change', function() {
if(this.checked) {
// Checkbox is checked..
typed.stop();
} else {
// Checkbox is not checked..
typed.start();
}
});
vendor: [
'firebase'
],
import * as firebase from 'firebase/app'
import 'firebase/auth'
import 'firebase/database'
var config = {
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "233455844395"
};
!firebase.apps.length ? firebase.initializeApp(config) : ''
export const GoogleProvider = new firebase.auth.GoogleAuthProvider();
export const auth = firebase.auth();
export const DB = firebase.database();
export default firebase
$('.chips').on('chip.add', function(e, chip){
// you have the added chip here
});
$('.chips').on('chip.delete', function(e, chip){
// you have the deleted chip here
});
$('.chips').on('chip.select', function(e, chip){
// you have the selected chip here
});
<ul id="menu" class="menu"></ul>
function MenuView (obj) {
return `<li id="${Object.keys(obj)}">${Object.values(obj)}</li>`
}
const fetchMenu = async (name) =>{
const url = `https://testprese.firebaseio.com/${name}/.json`;
const response = await fetch(url);
return await response.json();
}
(async ()=>{
const menu = await fetchMenu ("menu");
let list = '';
menu.forEach((item) => {list += MenuView(item);});
document.getElementById('menu').innerHTML = list;
})();