Showing a DIV on click UI element


I want to achieve something along the lines of below but am completely and utterly stuck with how to do it.

I want to click on a UI link which I have set up and then show a DIV element (to mask the slow load into the next scene).

I’ve tried tonnes of things and been reading all day but I’m so new to this and really need a bit of help.

Thanks so much

var ShowCurtain = pc.createScript('showCurtain');

// initialize code called once per entity
ShowCurtain.prototype.initialize = function() {

   var that = this;'.link').click(function() {
        ('#curtain').fadeIn('slow', function(){


// update code called every frame
ShowCurtain.prototype.update = function(dt) {

// swap method called for script hot-reloading
// inherit your script state here
// ShowCurtain.prototype.swap = function(old) { };

// to learn more about script anatomy, please read: