Functions of Template .js Files

Javascript .js files used in Allwebco templates

Pinned Note .js Files
All Allwebco templates use .js files. These files all contain Javascript. .js files are used to globally add scripts to all webpages and may be used to globally "write" items to the template webpages. Example: The menu.js "writes" the menu on all template HTML pages. Below is a list of template .js files and their functions.

See Also…

Notes on .js files:
  1. Template .js files can be edited using a plain text editor like Notepad in Windows or TextEdit on Mac. More....
  2. All .js files should be uploaded when you upload your template to your hosting area.
  3. .js files are used for global functions like for menu or footer display or a gallery menu or watermark. They are also used for script functions like no right click or the dynamic F.A.Q. or popup webpages.
  4. Many .js files include yes/no options at the top of the file. These options can be edited with a plain text editor. More....
  5. Code for the date display or location, watermark, zoom, or a search may all be included in a .js file, however newer templates may instead have these options in the .css file(s).
  6. Your template may only include some of the .js files listed below.
  7. For info about .js files not listed on this page, see your template "help.html".

The template "menu.js" is for globally writing the menu on all template HTML pages. Most templates include a "menu.js" (templates with jQuery includes use a "menu.htm" instead). The menu can be either a button, text link or drop menu. Menu colors and font sizes are edited in your template .css file(s). Some "menu.js" files may include editable options at the top.

See editing the menus (non-drop)

See your template help.html for the correct links to edit your template menus.

menu-gallery.js / menu-videos.js / menu-slideshows.js
Works like the "menu.js" and is used on gallery, video and slideshow pages.

See editing the menus (non-drop)

A "sidebar.js" will usually be a global file that shows the sidebar on all HTML pages. In some cases the gallery pages may not include the sidebar. Code for a template date or search may be in this file. The "sidebar.js" in older templates may include a pageheight option, or may include options at the top of the "sidebar.js" (new templates use the .css files for the pageheight).

See editing the sidebar.js

sidebar-left.js / sidebar-right.js
Same as indicated above but these would be for the left or right side of the template pages.

See editing the sidebar.js

The "header.js" contains the graphic and text logo options and may include a Flash logo. In some templates the date display location code will be in this file as well as an option to display an image in the header.

The header color may conform to the page background color or the background color can be edited in the .css file. In older templates you can edit the Flash background color in this file.

See header logo | header options | edit .js variables

Same function as the "header.js" but used for the F.A.Q. pages.

Used in templates with Flash headers. This file is for if you do not want a Flash logo and would rather use your own graphic image in the header. See the options section on your template "help.html" to use the "graphic_logo_header.js".

See header options

phone.js / contact.js
To display contact info on the "contact.htm". In some cases this file may also display info on the "about.htm" or "services.htm" pages. Contact information is included in a .js file so search engines are less likely to read the information and you'll get less spam.

See editing .js files

copyright.js / footer.js / copyright-allwebco.js / footer-copyright.js
These files are used for the template bottom footer area.

See editing .js files | Allwebco copyright

Footer for the popup type F.A.Q. pages only. Works like the above footer files.

Used for the template search box. See your template "help.html" for details on this file.

The "javascripts.js" may include multiple scripts including jQuery functions for the drop menus, mobile menu or click menu, or gallery viewer options. You can add new global scripts to this file, like for example, you could add right click protection inside this .js file and all your HTML pages would be updated. Do not add any items like a menu into this file or any "document write" type scripts in this file. This file is used in the HTML <head> section of each template webpage.

Google Analytics code can be added to the "javascripts.js" so you don't have to add it into each webpage. See Google Site Verification and Analytics Setup Steps.

See edit .js variables

javascripts-header.js / javascripts-footer.js
These files both function much like the "javascripts.js" as outlined above and will be inside the "includes" folder. Sometimes a script may need to be added to the <head> section of a webpage and some scripts need to be at the bottom of the page. These two files allow for more script placement flexibility.

This file is for the watermark that is layered over the gallery and slideshow images in some templates. See the options section on your template "help.html" for more details.

For the gallery image zoom function (In some templates for the "color to B&W" link). In some templates you may only see the zoom when testing in the IE browser and you may not see the zoom in Firefox or Chrome. You can turn off the zoom in this file. See the options section on your template "help.html" for more details.

This file usually contains multiple functions to, control popups, control gallery image changers, gallery or image popup tooltips, slideshow code, right click protection, video or audio popups as well as other functions.

See .js file variables

Used in older templates (new templates use the .css files for the pageheight). A "pageheight.js" file is used so all your HTML pages will maintain a standard height. See your template "help.html" for details on this file. In some cases the pageheight may be included in your template sidebar.js or in your template .css file.

See editing .js files

Used in older drop menu templates. Located in the template "css" folder. Used for quick color changes. See the options section on your template "help.html" for more details.