X-Git-Url: https://git.danix.xyz/?p=danixland-wporg-stats.git;a=blobdiff_plain;f=js%2Fdnxwporg-utils.js;fp=js%2Fdnxwporg-utils.js;h=339a437b77e0988e74cea67b635c28f4ec295b1a;hp=0000000000000000000000000000000000000000;hb=38cb3d1da942201ae9efb1318e81be77325e2037;hpb=086f160fac8424d8619d0ffd2bc23b1cfc0ab7ae diff --git a/js/dnxwporg-utils.js b/js/dnxwporg-utils.js new file mode 100644 index 0000000..339a437 --- /dev/null +++ b/js/dnxwporg-utils.js @@ -0,0 +1,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); \ No newline at end of file