Announcement

Collapse
No announcement yet.

extend scripts.js file to support other pages

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

    extend scripts.js file to support other pages

    I have a new page with the page code of 'this-page'. How do I go about adding a new function in the scripts.js file so it support the initial onload? I look at the function at the top but not understanding it. Can someone help? I try the below but doesn't seem to work.

    jsTHISPAGE:
    jsTHIS-PAGE:

    Thanks

    #2
    Re: extend scripts.js file to support other pages

    To add a page with the code of "this-page" to the scripts.js file, the code to initialize the function would be "jsThisPage". The function you are referring to at the top of the file will take the body ID, in this case "js-this-page", remove the "-" and capitalize the first letter of each section resulting in "jsThisPage".
    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
      Re: extend scripts.js file to support other pages

      Thanks Matt

      Comment

      Working...
      X