On 1/8/15, 4:00 PM, in article m8mum7$k6e$1@dont-email.me, "Denis McMahon"
<denismfmcmahon@gmail.com> wrote:
> On Thu, 08 Jan 2015 13:17:12 -0600, Bint wrote:
>
>> I tried to add a date formatting script to my html file, and I started
>> getting this error -- it doesn't happen every time, though. I was
>> already including jQuery in my <head>. I put the new script include at
>> the bottom of the <body>, but it still gives me the error. Anyone know
>> what I can do to fix it?
>>
>> I haven't gotten this error when using jQuery on my own -- just once I
>> tried to include this date formatter..
>
> It's a good job that we're all psychic and can feel our way across the
> internet to your machine to read your code and see the error message
> you're getting, because otherwise, inb the absence of you posting the
> actual code and error messages, we wouldn't have a clue as to what the
> problem is.
>
> The problem at the moment is that you have no idea how to ask for coding
> help:
>
> 1) Post the code that gives the error
> 2) If it gives an error message, post the error message message
> 3) If otherwise it's not doing what you want, tell us (a) what you want
> it to do and (b) what it actually does.
>
Well I can't post the whole program. I thought maybe it was a simple newbie
error. Did you not read my subject line? The error message is " Error
can't find variable: $" just like it says in the message subject line.
Basically I am including this script like this:
<script type="text/javascript" src="date.js"></script>
And like I said, I include it at the bottom of my body. I already include
jQuery like this in my <head>
<script type="text/javascript" src="jquery-1.11.2.min.js"></script>
Other than that I am not sure what you want. I am not even trying to use
the library, simply including it causes the error. And like I said, the
error doesn't happen every time, just about half the time.
It seems like a timing thing, where it is trying to parse the date.js script
before it has parsed jQuery. But besides including Jquery in the head and
this other script in the body, I don't know what to do to make sure the
library gets loaded after jQuery.
Sorry if the question is still unclear.