How to hide a marker when the marker is clicked once
-
Hello. I am trying to create a page similar to an escape room game by applying this plug-in.
plugin.$container.on('click', '.ipnrm-marker', (e) => { const markerId = $(e.currentTarget).attr('data-marker-id'); const emptySlot = slotSpace.querySelector('.slot:empty'); if (markerId === '1639565F44' && emptySlot) { const item3 = document.createElement("div"); item3.className = "item"; item3.id = "note"; item3.innerHTML = '<img src="1.png">'; item3.addEventListener('mousedown', startMove); item3.addEventListener('touchstart', startMove, { passive: false }); emptySlot.appendChild(item3); } });
By using the above code, clicking the marker creates an item in an empty slot.
After creating the item like this, I need to hide this marker, but I can’t proceed any further in the process of making the marker invisible.
I didn’t understand the algorithm by which the markers are generated.
Can you tell me how to make the marker invisible, or how to use the marker for a one-time use? Thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to hide a marker when the marker is clicked once’ is closed to new replies.