Here is the basic structure
-Website
Index.php
- Inner<---- has 3 sub folders
one<--- each sub folder has at least one other
onetwo
file.js
two<-sub folder
twotwo
twothree
include.php <--- a file that appears on all pages. I would like to include another file to php include() and include file.js
three<- sub folder
threetwo
file.php
Things I've tried.
Putting the actual script in the include.php using script tags, but it only worked on that one page. To be a bit more clear, this is for a navigation.
I've also tried
<?php include($_SERVER['DOCUMENT_ROOT'].'./one/onetwo/file.js'); ?>
<?php include(/one/onetwo/file.js); ?>
I've even tried to use php include(_dir_)..but i think i used that wrong. I've tried ever possible combination so i'm thinking maybe its something else or another way. Not sure what i'm doing wrong.
I have managed not to get a warning on occasion in testing but it seems to just print out in text the actual script ... which i'd be okay with if the navigation actually worked.
$(document).ready(setDropDown);
function setDropDown(){
$("#navigation li").hover(function() {
var timeout = $(this).data("timeout");
if(timeout) clearTimeout(timeout);
$(this).children("ul").slideDown(350, function(){
$(this).parent().addClass('activeList')
})
}, function() {
$(this).data("timeout", setTimeout($.proxy(function() {
$(this).children("ul").slideUp(200, function(){
$(this).parent().removeClass('activeList')
})
}, this), 300));
});
}

New Topic/Question
Reply



MultiQuote




|