w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Jquery is not working at the time of opening page at first

looks like you are calling $(window).resize() inside the resize handler

$(document).ready(function () {
    $(window).resize(function () {
        $('.welcomer').css({
            position: 'absolute',
            "top": ((($(window).height() - $('.welcomer').outerHeight()) /
2) + $(window).scrollTop() + "px"),
            "left": ((($(window).width() - $('.welcomer').outerWidth()) /
2) + $(window).scrollLeft() + "px")
        });

    }).resize(); // To initially run the function:
});




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.