(function($) {
    "use strict";
    $( document ).ready( function () {
        $("body").on("change",".yeepdf_data_enable",function(e){
            var tab = $(this).data("tab");
            if($(this).is(":checked")){
                $(tab).removeClass("hidden");
            }else{
                $(tab).addClass("hidden");
            }
        })
        $("body").on("change",".yeepdf_contact_form_7_remove",function(){
          var form_id = $(this).val();
          $("#yeepdf_contact_form_7_entry").html("<option>Loading...</option>");
          $.ajax({
             url: ajaxurl,
             'type': "POST",
             data: {
                 action: 'yeepdf_cf7_get_entries',
                 form_id: form_id
             },
             success: function(msg){
                    var ot = '<option value="0">Sample to show</option>';
                    ot += msg;
                  $("#yeepdf_contact_form_7_entry").html(ot);
              }
         });
     })
    })
})(jQuery);