[Resolved] Trouble with Javascript for Tabs

Home Forums Support [Resolved] Trouble with Javascript for Tabs

Home Forums Support Trouble with Javascript for Tabs

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2359161
    Milo Lam

    Hi, I was trying to follow this video to achieve tabs for my site. I tried adding the appropriate CSS and JS files into my child theme folder and enqueued it using the PHP code mentioned.

    But not sure why it’s not working. Hope someone can help, thanks.

    #2359216
    Leo
    Staff
    Customer Support

    Hi there,

    We can’t really help with custom solutions found in Youtube or Google here unfortunately.

    Can you try to ask the author in the comment section? I believe he is quite active there.

    #2363444
    Milo Lam

    Hey, Leo! All good no worries. I actually only wanted to ask about whether or not I added Javascript correctly for future solutions. Are all that’s needed (if going the plugin-less route) to add Javascript into my site?:

    1. Add the JS file to child theme directory
    2. Add in PHP to enqueue the JS code

    Sorry if this is still overgeneralizing. Any suggestions would be helpful. Thanks

    #2363493
    Fernando
    Customer Support

    Hi Milo,

    You can add JS through a Hook Element. JS are usually add in wp_footer.

    If you’re adding a JS file, then enqueueing it through PHP in your child theme is correct.

    #2376817
    Milo Lam

    Thanks guys!

    #2376880
    Fernando
    Customer Support

    You’re welcome Milo!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.