fix some stuff
This commit is contained in:
parent
c256a7f68e
commit
f185a2793c
6
index.js
6
index.js
@ -192,7 +192,7 @@ function showImages() {
|
||||
$(".originalplace").on("click", function(e){
|
||||
let targetElement = $(this);
|
||||
if (targetElement.hasClass("imageholderak")){
|
||||
let [emptyindex, idcko] = getEmptyIndex($(".finalimageplace"), this);
|
||||
let [emptyindex, idcko] = getEmptyIndex($(".finalimageplace"));
|
||||
if (emptyindex > -1){
|
||||
let changingelement = $("#" + idcko);
|
||||
changingelement.html(targetElement.html());
|
||||
@ -202,7 +202,7 @@ function showImages() {
|
||||
}
|
||||
|
||||
if (targetElement.hasClass("letterholderak")){
|
||||
let [emptyindex, idcko] = getEmptyIndex($(".finalletterplace"), this);
|
||||
let [emptyindex, idcko] = getEmptyIndex($(".finalletterplace"));
|
||||
if (emptyindex > -1){
|
||||
let changingelement = $("#" + idcko);
|
||||
umami.trackEvent('Clicked letter', { type: 'clickletter', datacode: targetElement.attr("datacode") });
|
||||
@ -263,6 +263,7 @@ function generateItem(word){
|
||||
$(".itemholderak").each(function(){
|
||||
$(this).on("click", function (e){
|
||||
let datacode = $(this).attr("datacode");
|
||||
umami.trackEvent('Listened to image', { type: 'listenimage', datacode: $(this).attr("datacode") });
|
||||
document.getElementById("audplayitem"+ datacode).play();
|
||||
})
|
||||
});
|
||||
@ -290,7 +291,6 @@ $(function() {
|
||||
$("#verify").on("click", checkAnswers);
|
||||
|
||||
$("#trashcan").on("click", cleanup);
|
||||
umami.trackEvent('Page loaded', { type: 'load' });
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user