• Resolved marcusasiabc

    (@marcusasiabc)


    Hello there,

    After the button-box slides into the screen by clicking, is there any tweak / add-on to allow visitors to slide the box back to the original icon-only position?

    Many thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter marcusasiabc

    (@marcusasiabc)

    It happens on touchscreen devices when mouse hover does not exist.

    Thread Starter marcusasiabc

    (@marcusasiabc)

    If the action is “slide”, I found a workaround:

    1. Create a button
    2. URL is “#”
    3. text is “CLOSE”
    4. icon is “fas fa-times”

    So, you have created a fake close button.

    Thread Starter marcusasiabc

    (@marcusasiabc)

    Regarding the “fake close button”, it has an issues:

    When a visitor clicks / touch it, the browser will reload the page. It is the normal behavior of the HTML a tag. So, I should remove the a tag but keeping the content inside, here is the JQuery script I used:

    
    $('#ssb-btn-X span').unwrap();
    
    // Replace #ssb-btn-X with the actual button for sliding the button area back to original
    

    I add the code directly in the plugin file:
    HOME/wp-content/plugins/sticky-side-buttons/assets/js/ssb-ui-js.js

    Plugin Author Maeve Lander

    (@enigmaweb)

    Sorry I didn’t get to this immediately but it appears you’ve come up with a good solution yourself. Nice! Thanks for sharing here.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Slide back to original position’ is closed to new replies.