xxxxxxxxxx
// Troggle attribute in jquery
$( selector ).attr('disabled', function(_, attr){ return !attr});
xxxxxxxxxx
if ($('button').attr('data-repeat')) {
$('button').removeAttr('data-repeat');
} else {
$('button').attr('data-repeat', 'true');
}