redcokehome / jquery-modalbox-plugin

Automatically exported from code.google.com/p/jquery-modalbox-plugin
0 stars 0 forks source link

Auto load on first visit #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Can i do autoload modalbox for first page visit in session? or something else?

Original issue reported on code.google.com by Lexx1...@gmail.com on 18 Dec 2013 at 2:21

GoogleCodeExporter commented 8 years ago
Yes, you can. Use the direct call method.

<script type="text/javascript">
    function myCustomCallForFirstSession()
    {
        jQuery.fn.modalBox({ 
            directCall: { 
                data : '<div class="testclass"><p>test</p></div>'
            }
        });
    }

    function mySessionFunctionalities()
    {
        return true;
    }

    if( mySessionFunctionalities() )
    {
        myCustomCallForFirstSession();
    }
</script>

In addition, of course, you still need to implement the 
"mySessionFunctionalities()".

Original comment by steffen....@googlemail.com on 18 Dec 2013 at 7:51