Hello i am trying to do custom popup for confirm window ( as i know its impossible to change that)
      $('.delete_current_form').on('click', function() {
      if( confirm("{{ 'Post will be deleted! Continue?'|trans }}") ){
        var scheduleEntryId = $(this).attr('data-id');
        if (scheduleEntryId) {
            $.get('{{ path('schedule_delete_entry', {'id': '0'}) }}'.replace('0', scheduleEntryId));
            $(this).attr('data-id', '');
        }
        $(this).parent().parent().parent().removeClass('selected_field');
        $(this).closest('.all_wrap').find('form select, form textarea').val('').change();
        $(this).closest('tr').removeClass('green_background');
        $(this).closest('.all_wrap').addClass('showing_real');
        allCounts();
      }
    });
As you noticed there is function that is made on click on specific div element. i want to make popup else where to run code only when i click yes, and do nothing when i click no.
<div class="popup">
  <div class="yes_button">YES</div>
  <div class="no_button">NO</div>
</div>
what i am trying to achieve it 1. i click on delete_current_form button 2. .popup shows up and if i click .yes_button the code that is inside .delete_current_form if runs
 
     
     
    