I'm trying to hide/show metaboxes dependant on the page template chosen. This has been working fine until I have come to show a metabox on more than one chosen page template.
The below code displays the Rich Content Editor for default pages, but not page-child.php pages. I'm guessing I have written the code incorrectly:
(function($){
$(function() {
$('#page_template').change(function() {
$('#postdivrich').toggle($(this).val() == 'page-child.php') ;
$('#postdivrich').toggle($(this).val() == 'default') ;
}).change() ;
}) ;
})(jQuery) ;