popup window or lightbox?
superherogeek

Hi All,

I'm working on a matching game based on the matching game tutorial found on this site, with my own tweaks to fit the need.  I'm at the point where I need to show some text (about 1 - 2 paragraphs) when a match is made in the game.  I know how to make it all work with the alerts, but I'd much rather use a lightbox.  I've written code for lightboxes in the past, but I can't remember how to call them up from a .js file.

In my example, if a student matches the image of a windows screen to the text "Windows", they should get a popup explaining some of the history of the widnows operating system.  Again, I know how to write a popup, but no clue how to call it from within wade.  

Any guidance would be appreciated. I'm happy to share the project files.

Thanks.

All 2 Comments
Gio

Hi

When using WADE, there is nothing special that you need to do to interface with other js libraries - you just do what you would normally do on a web page.

I am not familiar with lightbox.js, but I have used a similar thing called fancybox.

With fancybox, you just create a div and do:

$('#yourDivName').fancybox();

 

superherogeek

Thanks Gio,

I appreciate the guidance.  I got stubborn and managed to write it in with other things I wanted in the program as well. But I'll keep this in mind for the next thing I work on. It's been years since I've done this kind of thing so it was fun.  I have a small suggestion to make, I would suggest a new audio tutorial.  I followed the one I watched on clockworkshilli.com and when I used the code playIfAvailable I got a notice that it was being phased out.  Then, I didn't know to add the audio to the Audio section of the file (on the right hand side of the screen) so it took me a while to figure out why the audio didn't work.  

Just a thought.  

Thanks for your useful replies, I appreciate it.

Post a reply
Add Attachment
Submit Reply
Login to Reply