PluginProbe
Datafeedr API / 1.4.2
Datafeedr API v1.4.2
1.4.2 1.0.125 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29 1.0.3 1.0.30 1.0.31 1.0.32 1.0.33 All 181 releases
datafeedr-api / js / general.js

general.js in Datafeedr API 1.4.2, at js/general.js

30 lines 794 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(function($) {
2
3 // Add .dfrapi_hide_label class to .form-table > tr > th labels when specified in add_settings_field();
4 dfrapi_hide_label = $( "label[for='DFRAPI_HIDE_LABEL']" ).closest( "th" );
5 $(dfrapi_hide_label).addClass( "dfrapi_hide_label" );
6
7 // Toggle Amazon API settings
8 function dfrapi_toggle_amazon_api_settings() {
9 var amazon_api = $( 'input[name="dfrapi_configuration[amazon_api]"]:checked' ).val();
10 if ( amazon_api == 'paapi' ) {
11 $( '.paapi_settings' ).show();
12 $( '.capi_settings' ).hide();
13 } else {
14 $( '.paapi_settings' ).hide();
15 $( '.capi_settings' ).show();
16 }
17 }
18
19 $( 'input[name="dfrapi_configuration[amazon_api]"]' ).on( 'change', function() {
20 dfrapi_toggle_amazon_api_settings();
21 } );
22
23 dfrapi_toggle_amazon_api_settings();
24
25 });
26
27
28
29
30