JSFiddle - React, Tailwind, and code Playground

by apoucoz

HTML

<link rel="stylesheet" href="http://imapo.ru/css/jBox.css">
<script src="http://imapo.ru/js/jBox.min.js"></script>
<link rel="stylesheet" href="http://imapo.ru/css/ModalBorder.css">
<link rel="stylesheet" href="http://imapo.ru/css/NoticeBorder.css">
<link rel="stylesheet" href="http://imapo.ru/css/TooltipBorder.css">
<link rel="stylesheet" href="http://imapo.ru/css/TooltipDark.css">
<span id="del_news1">Кнопка 1</span>
<br><br>
<span id="del_news2">Кнопка 2</span>
<br><br>
<span id="del_news3">Кнопка 3</span>
<br><br>
<span id="del_news4">Кнопка 4</span>
<br><br>

CSS

body {
    height:1000px;
}

img {
    width:200px;
    height:150px;
    opacity:0.5;
}

JavaScript

function confirm_me(a) {
new jBox('Confirm', { 
blockScroll: 0, // Не убираем прокрутку body
content: 'Нравится jBox?', // Текст вопроса 
confirmButton: 'Да', // Текст кнопки "Да" 
cancelButton: 'Неа', // Текст кнопки "Нет" 
confirm: function() {
alert('Вы нажали ДА. Активная кнопка с id=' + a); // Функция при клике по "Да" 
//sdel_news.close(); 
}, 
cancel: function() { 
alert('Вы нажали НЕТ, Активная кнопка с id=' + a); // Функция при клике по "Нет" 
//sdel_news.close(); 
}
}).open();
}

$(function() {

$( "span[id*='del_news']" ).click(function() { 
var retIMGid = (this.id).replace('del_news',''); 
var atachEv = '#del_news'+retIMGid; 
confirm_me(this.id);
});

});