gricha2380/regex

Show card info on click

Closed this issue · 3 comments

Once drag is in place, use click to display card details in modal.

/this will be done for cards in the deck and not for cards in the hand. It's more useful there.

Create info icon for all cards. <div class="info">?<div/>

$(".info").on("click",function(){ let whichCard = $(this).parent().find("WHATEVER").attr("value"); populateModal(gameState[whichCard].info) })

let populateModal = (info)=>{
// make close button
// function for close button event listener
// Card name
// Card description
// Card examples
}

Done. And it looks pretty decent, too.