Ajax script loads to the top of page

Viewed 18

I have an issue with this ajax call, after clicking on the button to load data, the screen scrolls to the very top of the page, how can I load this without having to scroll up in other words I just want it to load in the same area where the button is located.

                    $("#number").on("click", function() {
                    $.ajax({
                        url: 'list.php',
                        method: 'POST',
                        data: {
                        number: '{$ID}',

                        },
                        success: function(data) {
                        console.log(data);

                        $("#page_details").html(data);
                        }
                    });
                    });

                    
0 Answers
Related