• Creator
    Topic
  • #605
    Anonymous
    Inactive

    Hi Milan, how to trigger the slide from a href? TY.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #606
    MillaN
    Keymaster

    Hi,

    Best way to do it is to add new JavaScript function that you can than call via HREF. This needs to go somewhere in your page where the JavaScript is included, this is whole SCRIPT block (maybe footer.php):

    <script type="text/javascript">
      function href_trigger_slider_tab() {
        jQuery("#contactable-inner").trigger("click");
      }
    </script>

    And your href should be like in the example here:

    <a href="javascript:href_trigger_slider_tab()">Trigger Slider</a>

    Best regards,
    Milan

    #608
    Anonymous
    Inactive

    Works beautifully..TY

    #609
    MillaN
    Keymaster

    You are welcome. Let me know if you need any help with the plugin.

    #610
    Anonymous
    Inactive

    Another problem with mobile users. Im using iphone and the whole form slide out beyond the viewport. Is there a way to either exclude this for mobile users or optimze this form for mobiles? Thanks again.

    #611
    MillaN
    Keymaster

    There is a tutorial for excluding/including form on some page only:

    http://www.millan.rs/tutorials/simple-contact-slider/enable-slider-only-on-some-pages/

    Same method can be used to determine if the browser is mobile using this conditional function:

    http://codex.wordpress.org/Function_Reference/wp_is_mobile

    Milan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Triggering a href’ is closed to new replies.