Announcement

Collapse
No announcement yet.

JavaScript Resources

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    JavaScript Resources

    Hi Matt,

    I read through all the post on combining CSS files. Is there a similar method for all the js files? Kinda stuck on the methodology that is needed in handling js files.

    I follow all the steps to create the Hero slider for my shadow theme but couldn't get it to work. I have the roundable.js active and are part of the resource group 'footer_js'. I also went ahead and added an attribute type = "text/javascript" but nothing show on homepage.

    I did the same with theme.js (where i add the code to the jsSFNT section) but with no luck.

    https://docs.miva.com/elements/exten...ml#hero-slider



    #2
    There is no current version of that for JavaScript. All your functionality should be called in through the theme.js file, so the addition of the roundabout script to the footer should not be needed. Are you receiving any errors on the page and can you post a link?
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Thanks Matt for the quick response. So I am a bit confused. How does theme.js file get loaded on the page? When support setup my dev site. The two footer_js script display are

      <script src="themes/shadows/core/js/jquery.min.js" data-resource-group="footer_js" data-resource-code="dom"></script>
      <script src="themes/shadows/core/js/scripts.js" data-resource-group="footer_js" data-resource-code="scripts"></script>


      The theme.js was disabled for global and active.

      So for someone new to Shadow, how do i go about adding an extension to the site? Do I keep the current two and enable theme.js? My dev site is password protected by support so if you provide me your email, I can send that over for you to take a look.

      Thanks

      Comment


        #4
        The theme.js file is called in by the scripts.js file and the function within are called as needed. As for adding an extension, the link you posted earlier [ https://docs.miva.com/elements/exten...ml#hero-slider ], will take you through the steps you need to have it work.
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          Hi Matt,

          I like to add the readmore js (https://github.com/jedfoster/Readmore.js) to the site. Any documentation on adding new js files as an extension to the site (If i need it as as an extension)? Do I need to create an extension folder and have the js and css files there? For the old readytheme, I just add the function to the plugins.js and call it from the scripts.js. Any tricks or method on adding this?

          Comment


            #6
            If you want to create an extension, you would put the resources into their own folder under extensions and follow the coding examples of the existing extensions. However, if you are only looking to add some functionality to your site, you can do that the same way you would have with a Legacy ReadyTheme; i.e. add the JavaScript file to the UI -> JS folder and call it in through theme.js.
            Matt Zimmermann

            Miva Web Developer
            Alchemy Web Development
            https://www.alchemywebdev.com
            Site Development - Maintenance - Consultation

            Miva Certified Developer
            Miva Professional Developer

            https://www.dev4web.net | Twitter

            Comment

            Working...
            X