summaryrefslogtreecommitdiffstats
path: root/js/dnxwporg-utils.js
blob: 339a437b77e0988e74cea67b635c28f4ec295b1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
( function( $ ) {
	"use strict";

	$( document ).ready( function() {
		$("input#dnxwporg_use_desc").click( function() {
		    if ( $(this).prop("checked") ) {
		        $("textarea#dnxwporg_custom_desc").prop("disabled", !$("input#dnxwporg_use_desc").prop("checked"));
		        $("textarea#dnxwporg_custom_desc").focus();
		    } else {
		        $("textarea#dnxwporg_custom_desc").prop("disabled", $("input#dnxwporg_use_desc").prop("checked"));
		    }
		});
	});

})(jQuery);