• Resolved mmasouddd

    (@mmasouddd)


    Hi

    I want to show unread message counters in an element of elementor

    I find this soloution in your website:

    Sometimes you need to create custom unread messages counter at your website.

    This is example of jQuery code snippet to make counter display messages count dynamically:

    <script type=”text/javascript”> jQuery(document).on(‘bp-better-messages-update-unread’, function( event ) { var unread = parseInt(event.originalEvent.detail.unread); if( isNaN ( unread ) || unread < 0 ) unread = 0; var messages_count = jQuery(‘.header-notifications.user-messages span’); if( unread > 0 ){ messages_count.text(unread).attr(‘class’, ‘count’); } else { messages_count.text(unread).attr(‘class’, ‘no-alert’); } }); </script>

    I used this code in a html element but not shows any counter

    How can I have counter?

    Best Regards

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘show unread message counters’ is closed to new replies.