You can use a variable, like this:
var confirmed = false;
$('#shuffle').click(function(){
if(confirmed || confirm('This will shuffle all your bla bla bla')){
$("#upimagesQueue li").shuffle();
confirmed = true;
}
});
This starts with the confirm not being acknowledged, but the first time it is, it's set to true. This means the first part of the condition1 OR condition2
in your if()
would be true, so the confirm wouldn't pop up again.
Alternatively, you can use .data()
to store the variable for this:
$('#shuffle').click(function(){
if($(this).data('confirmed') || confirm('This will shuffle all your bla bla bla')){
$(this).data('confirmed', true);
$("#upimagesQueue li").shuffle();
}
});