Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1047148
    smenavto
    Participant

    Hello,

    Is it possible to have a button perform a “page jump” to a form — more specifically, to place the cursor in the top form field (to initiate quick typing)?

    You can see what I’m trying to accomplish here (via bottom-page button) : http://sensiblemicro.com/m27c1001-45xb1/

    Thank you in advance,
    Mike

    #1047149
    smenavto
    Participant
    This reply has been marked as private.
    #1047333
    Jade
    Moderator

    Hi there,

    Please try to add this code in the Custom > JS:

    jQuery("#theBtn").click(function() {
        jQuery("#firstname-02c1cc18-ed12-4016-80f5-50823b7f8f44").focus();
    });

    There is a JS error currently present on the page you have linked and is coming from the google font code you added in the custom JS. The code is correct but kindly remove the <script type="text/javascript"> before the font code.

    Hope this helps.

    #1047369
    smenavto
    Participant

    Ohhhhh man!!!

    http://gph.is/1QVRedG

    #1047462
    smenavto
    Participant

    I have a follow-up question…

    Is it possible to have more than one button perform the same action on the same form?

    For example, if you head here (http://sensiblemicro.com/storage-memory-solutions/) you can see that the large block button under “2.5″ SSD” works perfectly. However, when I try to do the same for the other buttons, it’s a no go…

    Think it can be done?

    Thanks again,
    Mike

    #1047493
    Joao
    Moderator

    Hi There,

    Try to use id instead of class, while an id can be assigned just to one element classes can be assigned to many elements.

    Please do not use ID and use theBtn as the button class instead, you can place it in more than one button.

    And use this code instead

    jQuery(".theBtn").click(function() {
        jQuery("#firstname-02c1cc18-ed12-4016-80f5-50823b7f8f44").focus();
    });

    Hope it helps,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1047148 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>