[Support request] Enter Jquery Code in my Gp theme

Home Forums Support [Support request] Enter Jquery Code in my Gp theme

Home Forums Support Enter Jquery Code in my Gp theme

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1103838
    Christine

    Hi,

    Where i can enter the Javascript code in my website?

    from This website

    The code I want to enter is

    $("form").keypress(function(e) {
      //Enter key
      if (e.which == 13) {
        return false;
      }
    });

    Let me know where to add the code.

    #1104061
    David
    Staff
    Customer Support

    Hi there,

    you can use a Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    Select the WP_footer hook and wrap your code in script tags:

    <script type="text/javascript">
    
    //jQuery code here
    
    </script>
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.