jQuery DIV Container disappears after 1 sec

I am filling a hidden div container with ajax content by pressing a button. As soon as the button is pressed, I want the container to show up with the new content.

This has been working fine for me using the following method:

$(document).ready(function () {
    $('.display').css({'display':'none'});

    $('.button').click(function() { 
        $('.display').show(); return false; 
    });
});    

Since I have a lot of content, the display div shows up sometimes before and until the DOM is loaded.

I have solved this, by hiding the display div in the stylesheet.

The problem now is, as soon as I press the button, the div container shows up for one second and then disappears even though I did not write in my jquery code to hide it.

Answers


check like this

 $(document).ready(function () {
    $('.display').css({'display':'none'});

$('.button').click(function() { 
         $('.display').css({'display':'block'});
         return false; 
    });
});

Need Your Help

Copy rows from source table to new table given condition

sql ms-access

I use the following code but the program gives out an error and does not work:

Oracle logic to roll the value same level

sql oracle

I am facing issue is solving on oracle logic