jquery-confirm
jquery-confirm copied to clipboard
How to add target _blank value to link?
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?
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?
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>