skip to Main Content

Does Javascript fire twice for WordPress admin metabox?

I added a inline Javascript code to my metabox callback function. add_action( 'add_meta_boxes', function() { add_meta_box( 'catalog-item', 'Gegevens', 'catalog_details_callback', 'catalog', 'advanced' ); }); function catalog_details_callback( $post ) { <input type="text" class="price" name="price" id="price"/> <script type="text/javascript"> document.getElementById('price').onfocusout = function() { var…

VIEW QUESTION
Back To Top
Search