Stuck on step 6 onwards


Hello friends! This is my code:

$(document).ready(() => {
  $('.menu').on('mouseenter', () => {
  $('.menu').on('mouseleave', () => {
  $('.btn').on('mouseenter', event => {
  }).on('mouseleave', event => {
    $('.postText').on('keyup', event => {
    const $post = $(event.currentTarget).val();
    const $remaining = (140 - $post.length);

I’ve beeen trying to make the characters counter work for more than a couple hours, but to no avail. May i have a hint please?
Thanks in advance.


Anyone willing to help please? still stuck there


We have your code, but nowhere to test it. Please post a link to the exercise. Thanks.


Sorry and thanks for your interest


SInce $remaining is not a jQuery object, we don’t need to add the $. Remove it from the assignment line and the above will work.

Technically, $post is also not a jQuery object (but a string) so it should not have the $, either.


Thanks, I managed to make it work after some more research and with your insight. Cheers :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.