(function( $ ) { 'use strict'; /** * All of the code for your admin-specific JavaScript source * should reside in this file. * * Note that this assume you're going to use jQuery, so it prepares * the $ function reference to be used within the scope of this * function. * * From here, you're able to define handlers for when the DOM is * ready: * * $(function() { * * }); * * Or when the window is loaded: * * $( window ).load(function() { * * }); * * ...and so on. * * Remember that ideally, we should not attach any more than a single DOM-ready or window-load handler * for any particular page. Though other scripts in WordPress core, other plugins, and other themes may * be doing this, we should try to minimize doing that in our own work. */ $(document).ready(function(){ $('.aol_ad_page_settings').find('.tab-data:first').show(); $('.aol_ad_page_settings').find('.nav-tab').click(function(){ $('.aol_ad_page_settings').find('.nav-tab').removeClass('nav-tab-active'); $(this).addClass('nav-tab-active'); var target = $(this).data("id"); $('.aol_ad_page_settings').find('.tab-data').hide(); $("#"+target).show(); }); $('#aol_submission_default').click(function(event){ event.preventDefault(); $('#aol_submission_default_message').val(aol_admin.app_submission_message); $('#aol_submission_default_message').text(aol_admin.app_submission_message); }); $('#aol_required_fields_button').click(function(event){ event.preventDefault(); $('#aol_required_fields_notice').val(aol_admin.aol_required_fields_notice); $('#aol_required_fields_notice').text(aol_admin.aol_required_fields_notice); }); }); })( jQuery );