• Resolved Robert

    (@rob_e_rob)


    This is such an easy to use plugin. I think it is great!

    I am having a problem that I am not able to get around.

    When I click on a Favorite button it works as expected.

    1. the heart turns red (Favorited)
    2. the post id is updated in my db
    3. the List Results updates in my ‘Favorite Events” menu

    The problem is then..
    1. all the hearts also turn red

    This means that all buttons appear Favorited. If I click on a Favorited button, that isn’t technically favorited, it will appear as if it isn’t favorited but will update the post ID in my db.

    What I am basically writing out is that the function is then reversed after the first Favorited click.

    I’m using the short code [ccc_my_favorite_select_button post_id=”” style=””] in a loop which updates the post ID.

    I am using this short code to load the Favorited results [ccc_my_favorite_list_results class=”” style=””]

    Both short codes load on the same page.

    Any suggestions?

    (the page is designed for mobile browsers)

    • This topic was modified 2 years, 2 months ago by Robert.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Robert

    (@rob_e_rob)

    A quick update. When I inspect the element to each href after I click the favorite button the class “save” is added to each button. When I unfavorite the button the “save” class continues to show when I reload the page.

    Thread Starter Robert

    (@rob_e_rob)

    I figured it out.

    I revised the select.js file to find the data attribute of the selected ‘remove button’ and toggle the ‘save’ class of the button with the heart which then updates the button without requiring a page reload.

    Great plugin!

    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello @rob_e_rob ,

    Thank you for your question and rating.
    Sorry for the delay in answering.

    I’m glad it worked out.

    Your words are very encouraging!

    Thank you very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Like Button does nto Update’ is closed to new replies.