jquery-confirm icon indicating copy to clipboard operation
jquery-confirm copied to clipboard

How to add target _blank value to link?

Open roninit72 opened this issue 5 years ago • 2 comments

jquery-confirm version: v3.3.4

I'm submitting a ... (check one with "x") [ ] bug report [X] feature request [ ] support request

Other information:

How to open links in _blank target?

roninit72 avatar Jul 27 '20 07:07 roninit72

I mean, in the example $.fn.confirm , the one with the button Goto Twitter ( http://craftpip.github.io/jquery-confirm/#confirm ), how to make make the OK button open Twittter in a _blank page?

roninit72 avatar Jul 29 '20 06:07 roninit72

i also tried but didn't find any way to do so.

but alternatively, you can use onclick event on a button

example:

<buttons onClick="go()">GO to another link</buttons>

<script>
        function go(){
            $.confirm({
                title: 'Let\'s Go to another link',
                theme: 'material',
                buttons: {
                    Okay: {
                        text: 'Let\'s Go',
                        btnClass: 'btn-default',
                        action: function () {
                            window.open('Your link here', '_blank');
                        }
                    },
                    cancel: {
                        text: 'No',
                        action: function () {
                        }
                    }
                }
            });
        }
</script>

abhishekjnvk avatar Dec 13 '20 14:12 abhishekjnvk