# datafeedr-api/1.4.3/js/general.js

Datafeedr API, version 1.4.3. 30 lines.

- Page: https://pluginprobe.com/plugins/datafeedr-api/1.4.3/code/js/general.js
- Raw: https://pluginprobe.com/plugins/datafeedr-api/1.4.3/raw/js/general.js
- Modified: 2026-03-23T14:11:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/datafeedr-api/1.4.3/code/js/general.js#L10-L20`.

```javascript
jQuery(function($) {

	// Add .dfrapi_hide_label class to .form-table > tr > th labels when specified in add_settings_field();
	dfrapi_hide_label = $( "label[for='DFRAPI_HIDE_LABEL']" ).closest( "th" );
	$(dfrapi_hide_label).addClass( "dfrapi_hide_label" );

	// Toggle Amazon API settings
	function dfrapi_toggle_amazon_api_settings() {
		var amazon_api = $( 'input[name="dfrapi_configuration[amazon_api]"]:checked' ).val();
		if ( amazon_api == 'paapi' ) {
			$( '.paapi_settings' ).show();
			$( '.capi_settings' ).hide();
		} else {
			$( '.paapi_settings' ).hide();
			$( '.capi_settings' ).show();
		}
	}

	$( 'input[name="dfrapi_configuration[amazon_api]"]' ).on( 'change', function() {
		dfrapi_toggle_amazon_api_settings();
	} );

	dfrapi_toggle_amazon_api_settings();

});




       
```
