Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2009
    Location
    Nashville, TN
    Posts
    4
    Plugin Contributions
    0

    Default Help Calling JQuery?!

    I am trying to implement a jquery header but have been so far unsuccessful. I have read through other threads and understand the jscript_*.js method. However, I am trying to call js from the home page but have no idea where or how to hard code this.

    I need this between the <head></head> tags:

    <script type="text/javascript">
    $(document).ready( function(){
    $('ul#slider').innerfade({
    speed: 'slow',
    timeout: 4000,
    type: 'sequence',
    containerheight: '220px'
    });
    });
    </script>

    My template has a tpl_header.php file but I cannot find the html_header.php (if these are any different). Im not having trouble calling the jquery.js file, just adding this between the head tags. Any help would be greatly appreciated!

  2. #2
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    785
    Plugin Contributions
    7

    Default Re: Help Calling JQuery?!

    Look here:
    includes/templates/YOUR_TEMPLATE/common/html_header.php
    • 446F63746F722057686F •

  3. #3
    Join Date
    Dec 2009
    Location
    Nashville, TN
    Posts
    4
    Plugin Contributions
    0

    Default Re: Help Calling JQuery?!

    The only file located in the "common" folder of the template is tpl_header.php. Might this be located somewhere else? I have done a search for the file across the entire local files and can't find it!

  4. #4
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: Help Calling JQuery?!

    If you have created your own template and created new folders (as recommended) then those folders will only contain files that you have chagned and used in the template overide system


    So best bet is to go to the template_default folder, go to common and find the file needed.

    Once edited place it in your template folders, so the template override system will pick it up

    :)

  5. #5
    Join Date
    Dec 2009
    Location
    Nashville, TN
    Posts
    4
    Plugin Contributions
    0

    Default Re: Help Calling JQuery?!

    Ok, I will try that... thanks! Just so I am sure, the only way to hard code script or meta content between the <head></head> tags is to edit the "html_header.php" file?

    And if so, when this is edited do I remove it from the default folder or just copy it and add it to the template common folder?

    Thanks!!!

  6. #6
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: Help Calling JQuery?!

    Zen cart can pick up javascript files automatically, but i would suggest to hard code the JQuery files in as you dont want to go changing those names.

    So yep i would hard code those between the header tags (i had to do this recently on a recent project)


    No keep the original file in the default_template folder, and just add the updated version into your new template folder

    You keep the origanl files in the tempalte_default folder just in case there are any problems with the updates you implement, then you can just delete the updated file, and everything will be back to normal

    :)

  7. #7
    Join Date
    Dec 2009
    Location
    Nashville, TN
    Posts
    4
    Plugin Contributions
    0

    Default Re: Help Calling JQuery?!

    Awesome! Thats perfect - thanks for your help!

 

 

Similar Threads

  1. Help! Heading title calling for image - when shouldn't
    By portal2 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Mar 2011, 11:19 AM
  2. Jquery flash help
    By NYsista872 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Apr 2010, 08:02 PM
  3. Need help calling variables
    By philip937 in forum General Questions
    Replies: 27
    Last Post: 21 Mar 2010, 05:57 AM
  4. Help calling a PERL script
    By falstaffpac in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 May 2009, 12:08 AM
  5. Calling all css gurus, HELP! (please)
    By anduril3019 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Mar 2007, 08:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR