Sign in
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

JS Tabs

  • This topic has 6 replies, 2 voices, and was last updated 7 months, 3 weeks ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10271
    Avatar photoprintpeppermint

    I want to add tabbed content to my pages.

    I asked GPT to write the html, css, and js needed.

    I added the CSS in publii cms.
    I added the html direct in the page.
    I added the JS to the scripts.js file of my theme.

    But its not working 🙁

    Any ideas?

    #10272
    Avatar photoBob

    any URL?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #10274
    Avatar photoprintpeppermint

    https://mintletterpress.com/tabs-test.html

    See attached images for the html, css, and js I added.

    #10279
    Avatar photoBob

    I couldn’t find the JavaScript tab code in your source code. Where did you paste it?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #10280
    Avatar photoprintpeppermint

    Sorry, I pasted it at the bottom of the scripts.js file in the splitian theme assets… is that the right place for it?

    #10281
    Avatar photoprintpeppermint

    Oh wait now I think I figured it out. Publii makes a duplicate of each theme when you add it to one of your sites. I was pasting it on the general themes folder assets. Let me try again now.

    #10282
    Avatar photoBob

    Just to make one thing clear: the script.js file is the non-minified version of the scripts. The template loads the script.min.js file, so after adding your script to the script.js file, be sure to minify the code and place it in the script.min.js file.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

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