customContainer.html 2.53 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <title>Notification Types</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="demonstration of some noty capabilities">

    <link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic&amp;subset=latin,latin-ext,cyrillic' rel='stylesheet' type='text/css'>
    <style type="text/css">

        html {
            height: 100%;
            width: 100%;
        }

        body {
            font-family: 'PT Sans', Tahoma, Arial, serif;
            line-height: 13px
        }

    </style>

    <link rel="stylesheet" type="text/css" href="buttons.css"/>

</head>
<body>

<div class="container">

    <div id="customContainer" style="width: 400px; margin-left: 125px; margin-top: 50px; border: 1px solid #ccc; padding: 10px">
        <p><strong>Hi!</strong> I'm a custom container no:1</p>
    </div>

    <div id="customContainer2" style="width: 400px; margin-left: 125px; margin-top: 50px; border: 1px solid #ccc; padding: 10px">
        <p><strong>Hi!</strong> I'm a custom container no:2</p>
    </div>

</div>

<script src="jquery-1.7.2.min.js"></script>

<!-- noty -->
<script type="text/javascript" src="../js/noty/packaged/jquery.noty.packaged.min.js"></script>

<script type="text/javascript">

    function generate(container, type) {

        var n = $(container).noty({
            text        : type + ' for: ' + container,
            type        : type,
            dismissQueue: true,
            layout      : 'topCenter',
            theme       : 'defaultTheme',
            maxVisible  : 30
        });

        console.log('html: ' + n.options.id);
    }

    function generateAll() {
        generate('div#customContainer2', 'alert');
        generate('div#customContainer2', 'information');
        generate('div#customContainer2', 'error');
        generate('div#customContainer2', 'warning');
        generate('div#customContainer2', 'notification');
        generate('div#customContainer2', 'success');

        generate('div#customContainer', 'alert');
        generate('div#customContainer', 'information');
        generate('div#customContainer', 'error');
        generate('div#customContainer', 'warning');
        generate('div#customContainer', 'notification');
        generate('div#customContainer', 'success');
    }

    $(document).ready(function () {

        generateAll();

    });

</script>
</body>
</html>