Add character count to custom metabox

I assume the #feed element is the one in which you want the count value to appear? If so, change the #bgnp_metabox_tabs entry in your keyup function to #feed.

EDIT:

For some reason, I wasn’t seeing all the code when I first read the problem.

The id of your placeholder for the character count is the same as the id on which you are calling the after function. I would change the placeholder id to something like char-count.

You can then target that placeholder with jQuery(#feed #char-count) to get it to be shown only on the feed tab (assuming the feed tab has an id of #feed)

Leave a Comment