• Resolved Robin

    (@cinghaman)


    Hi,

    It works fine when I add animation to a section to slide in but when I close it closes abruptly instead of reversing the animation

    ie: doesn’t close smoothly back

    I tried to override the CSS using
    @keyframes and adding translateX but looks like you are controlling it with JS is their a trick I am missing I want the slide in to close like how smoothly it slides out.

    Basically, on click of button, it adds left: 100px but when I click close it still keeps left 100px and removes opacity to 0 and display none whereas it should also make left 100px to go back to 0;

    This is a closed state https://prnt.sc/106u3le
    This is an open state https://prnt.sc/106u44a

    Hope it makes sense.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Bel

    (@belimperial)

    Hello Robin,

    Thank you for reaching out!

    Currently, the animation on the display settings is for opening the popup. The close animation uses the default close function and not the animation from the display settings.

    On the other hand, you may submit a feature request to have an option for the close animation here: https://wppopupmaker.com/your-account/feature-requests/

    Hope that helps. If your issue is resolved please take a moment to rate and review the plugin.
    If you still need help please message us directly at https://wppopupmaker.com/support/

    Thread Starter Robin

    (@cinghaman)

    Hi Bel,

    Thanks for a quick reply.
    Is their a filter/hook I can use to disable your close functionality so I can add mine as right now if try to do that your close function ends up taking precedence.

    Thanks

    Bel

    (@belimperial)

    Hi Robin,

    Thank you for getting back and apologies for the delayed reply.

    I will need to escalate this to our developer as this is related to filter/hook code.

    Thank you for your kind understanding on this matter.

    Thread Starter Robin

    (@cinghaman)

    No problem, hopefully for future this can be added, for now I custom built my own.
    Good luck

    Plugin Author Daniel Iser

    (@danieliser)

    @cinghaman In this case you would currently need to overload our close method here: https://github.com/PopupMaker/Popup-Maker/blob/master/assets/js/src/site/plugins/pum.js#L498

    You could copy it to your own code and replace it via $.fn.popmake.methods.close = newReplacementCloseMethod;

    From there you can animate it however using jQuery.animate replacing the current .fadeOut method.

    Thread Starter Robin

    (@cinghaman)

    Ok thanks

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Animation on click button’ is closed to new replies.