Tuesday 7 August 2012

Create an JQuery Advertising Div on page which will disappear after some time.


Following function is useful for auto hiding a div from a page using JQuery
just copy and paste it in head tags

[code]
<script type="text/javascript">
        $(function () {
            $(document).ready(function () {
                setTimeout(function () {
                    $('#YOUR DIV ID').fadeOut('slow');
                }, 5000);   //<--- Time in miliseconds after which div will hide.
            });
        });
    </script>
[/code]

No comments:

Post a Comment