JSFiddle - React, Tailwind, and code Playground
JavaScript
function createColor()
{
color_id = $('#popupregblk table input[type="radio"]:checked').val();
if ( ! color_id )
{
closePopup();
return false;
}
_title = $('#popupregblk table tr[rel="'+color_id+'"] strong').html();
_color = $('#popupregblk table tr[rel="'+color_id+'"] .color-box').css('backgroundColor');
$.ajax({
type: "POST",
url: "/alotoadmin/item/createcolor",
data:
{
'color_id' : color_id,
'id' : <?=$_GET['id']?>
},
dataType: "json",
cache: false,
error: function(xhr, status, error) {
console.log(xhr);
console.log(status);
console.log(error);
},
success: function(msg)
{
console.log(msg.message);
if ( ! msg.status )
return false;
//тут мои функции
}
});
}