gricha2380 / regex

https://gricha2380.github.io/regex/demo
0 stars 0 forks source link

Show card info on click #6

Closed gricha2380 closed 6 years ago

gricha2380 commented 6 years ago

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

gricha2380 commented 6 years ago

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

gricha2380 commented 6 years ago

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 }

gricha2380 commented 6 years ago

Done. And it looks pretty decent, too.