Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    External Javascript

    Hi,

    I need help with a javascript I would like to setup, the files I have is a .css, .js and the .png it's a onmouseover help tool. Would anyone know of how to set this up properly, I'm trying to put it in a .tpl and html/php static page.

  • #2
    Regular Coder
    Join Date
    Jun 2011
    Location
    CA
    Posts
    105
    Thanks
    0
    Thanked 10 Times in 10 Posts
    OK, tell us exactly what is supposed to happen on the screen. The information you gave is is not enough for us to help you.

  • #3
    Regular Coder Redcoder's Avatar
    Join Date
    May 2012
    Location
    /dev/null
    Posts
    333
    Thanks
    2
    Thanked 47 Times in 46 Posts
    Well, to attach the external Javascript file, just have this in your code:

    PHP Code:
    <script type="text/javascript" src="js/myjavascriptfile.js" ></script>
    <link rel="stylesheet" type="text/css" href="css/mycssfile.css" /> 
    If your JS file uses JQuery, include this JQuery source link for the latest JQuery version. So that you'll have this:

    PHP Code:
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

    <script type="text/javascript" src="js/myjavascriptfile.js" ></script>

    <link rel="stylesheet" type="text/css" href="css/mycssfile.css" /> 
    If you need help on the onmouseover effect, JQuery makes it very easy for you. Check out

    http://api.jquery.com/hover/
    Last edited by Redcoder; 12-20-2012 at 09:24 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •