How to add java script confirm button for pagination ?

How to add java script confirm button for pagination ?

sreelaltlsreelaltl Posts: 1Questions: 1Answers: 0

I am using datatable and when user click on another page, I need to provide user, a confirm button. If user click on cancel, he should stay on same page else if he click ok, he should be navigated to next page.

         $('#example').on( 'page.dt', function (e, settings) {
        var status = confirm("Do you want to proceed ?")

        if (status == true) {
        //continue to clicked page
        } else {                
        // stay on same page    
        }

      } );
This discussion has been closed.