In wordpress backend -> add new post area, how to do something Immediately after metabox -> checkbox is checked, for example when I checked a category:
this is the the checkbox before checked:
<input value="1" type="checkbox" name="post_category[]" id="in-category-1">
this is the the checkbox after checked:
<input value="1" type="checkbox" name="post_category[]" id="in-category-1">
::before
</input>
SO, how to Detect the checkbox is checked and do function Immediately after it checked?
You can achieve that using jQuery.
I have this to say which category is added or removed after they are being ticked or unticked (change event).
To attach this jQuery. I check if the current page is adding/editing post with
get_current_screen()
like so.