• Resolved ripperman

    (@ripperman)


    I know this has been answered before but I am trying to activate the slider by clicking another basic html button on my page.

    I added jQuery(‘#wpcs_handle’).click(); to the click event of the button on my page but it doesn’t work. The result is that the tab/label appears in the middle of the page when the site loads, without clicking anything and the form stays constantly open at the footer?

    In summary, I want the slider to keep its default behavior (slide out on clicking the slide label) but also slide out when clicking a “Contact” button on my page.

    Any tips or help would be so appreciated as I think the plugin is great.
    Thanks.

    https://www.ads-software.com/plugins/wp-contact-slider/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Ripperman!

    We were off due to Holidays at our place. Anyways have tested your scriptjQuery('#wpcs_handle').click() in console and is working perfect without any error. Actually seems like there is some issue with your jQuery script as a whole which isn’t wrapped in proper event.

    Although this is out of scope of this support forum but we can still guide you if you provide us with the link of test page where you have implemented this functionality.

    Thanks!

    Thread Starter ripperman

    (@ripperman)

    Would it be possible to post the separate button code you tested and that worked here? I’m sure I could implement it in myself. If it’s not possible I understand.

    Thread Starter ripperman

    (@ripperman)

    Hi

    I’ve gone back to this trying to get it to work.
    I’ve tested the following code which is a simple test button. When I click, the slider slides out alright but slides back again straight away. The screen doesn’t fade as it should either. Seems like the slider form doesn’t gain focus or something? Any help would be so appreciated.

    <button onclick=”myFunction()”>Click me</button>

    <script>
    function myFunction() {
    jQuery(‘#wpcs_handle’).click();
    }
    </script>

    I’m using same method as ripp~ and can’t make it work at all. Is this code still working?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Button click to open slider’ is closed to new replies.