 I keep loosing my events, how can I keep them attached
<p>I have a small 'screen' that pops up over part of my page. This screen has two buttons on it. When either of these buttons get pressed the screen is removed. But the screen could need to be reused at a later time so instead of always rebuilding the screen i store it in data of an object on the page. While the stored screen reloads fine, all of the events seem to be missing as the second time the screen appears the buttons dont do n e thing. How can i fix this?</p>

<pre><code>function AddScreen() {
    var store= $('#store'), screen;
    if(objectStoringScreen.length &gt; 0){
        screen = objectStoringScreen.data('screen');
    }else {
        store = CreateStore(); //Create Store
        $(this).parent().append(store); //Add Store
        screen = Screen(); // Create Screen
    }

    PushScreen(screen); //Load selected screen

    function Screen() {
        //build div
        // build two buttons and place them in the div
        // btn1.click(onOK); btn2.click(onCancel);
    }

    function onOK() {
        store.data('screen',screen); 
        PopScreen();
    }
    function onCancel() {
        PopScreen(); 
    }
}
</code></pre>
