mask/unmask - function does not work on different positions
<p>There is a button. With this button I redraw my chart. Between I want to mask the chart. But on different position the mask und unmask function does not work. It is just the unmask function. But when i put the unmask function out of the if-part it doesnt work (example 2) In this code example it works</p>

<p><strong>example #1 - it works</strong>    </p>

<pre><code>// redraw chart 
function redrawfrequency()
{
    //hide screen
    $('#dividfrequency').mask();

    //get variables
    var datumstart = $('#&lt;?php echo $datumstart?&gt;').val();
    var datumend = $('#&lt;?php echo $datumendwithoutapo ?&gt;').val();
    var range =  $('#range&lt;?php echo $mysqltablename; ?&gt;').val();

    if (datumstart != "" &amp;&amp; datumend != "") 
    { 
    $.ajax({        
        url: "data.php",
        dataType: 'json',
        success: function(datareload) 
            {  //set new data in chart                           
                chartfrequency.series[0].setData(datareload); 
                //unhide screen
                $('#dividfrequency').unmask();  
            },
    });
    };  
return false;
};
</code></pre>

<p><strong>example #2 - it does not work</strong>    </p>

<p>The graph is not even masked</p>

<pre><code>// redraw chart 
function redrawfrequency()
{
    //hide screen
    $('#dividfrequency').mask();

    //get variables
    var datumstart = $('#&lt;?php echo $datumstart?&gt;').val();
    var datumend = $('#&lt;?php echo $datumendwithoutapo ?&gt;').val();
    var range =  $('#range&lt;?php echo $mysqltablename; ?&gt;').val();

    if (datumstart != "" &amp;&amp; datumend != "") 
    { 
    $.ajax({        
        url: "data.php",
        dataType: 'json',
        success: function(datareload) 
            {  //set new data in chart                           
                chartfrequency.series[0].setData(datareload); 

            },
    });
    }; 
     //unhide screen -&gt; here it does not work!
     $('#dividfrequency').unmask(); 

return false;
};
</code></pre>

<p>What can be the error? </p>
