Move_to_trash confirm JQuery dialog
-
Hello everybody!
I’d like to have a confirm dialog if somebody clicks on “move_to_trash”.
Right now I am able to react to the click with the help of JQuery and can interrupt the “move_to_trash” process with either an alert or a confirm() message.
function confirm_delete() { ?> <script language="javascript"> var $j=jQuery.noConflict(); $j(document).ready( function(){ $j("a.submitdelete").click(function(){ return confirm("Do you really want to...") }); $j("#submitpost #ajax-loading, #submitpost .ajax-loading").hide() } ); </script> <?php }
Thats how the function is called:
add_action('admin_footer', array($this, 'confirm_delete'));
The problem is that I need other buttons than “OK” and “Cancel” and therefore the JQuery modal dialog came to my mind.
Unfortunately I was not able to realize it within wordpress. The dialog will not display at all which might be due to my non-existing JQuery skills.
Any help is appreciated!
Best regards,
Stefan
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Move_to_trash confirm JQuery dialog’ is closed to new replies.