I know, there are a lot of questions like this, but they doesn't help me.
My situation is following.
- I copy one (working) site with some changes to create another.
- After I did it with not so much changes javascript on new site doesn't work, saying "ReferenceError: Can't find variable: jQuery" and "ReferenceError: Can't find variable: $".
I added into the code alerts:
alert('aaa');
var x=$('td[type="x"]').size();
alert('aaa1');
and see "aaa" alert, but don't see "aaa".
I've checked, like it is said here, with Safari's debugger that jquery files are found and loaded, I can see them in "Resources" tab.
adding ready in the line doesn't help:
alert('aaa');
var x=$(document).ready($('td[type="x"]').size());
alert('aaa1');- I belive the jquery was included before using it, my code looks like this:
<... HTML>
<script src="{$JS_DIR}/jquery/jquery-ui-1.8.6.custom.min.js?{$JS_VERSION}" language="javascript" type="text/javascript"></script>
<... OTHER JS includes>
{literal}
<script type="text/javascript">
<... other functions>
function XX() {
alert('aaa');
var X=$(document).ready($('td[type="x"]').size());
alert('aaa1');
<... other functions>
</script>
{/literal}
<EOF>
What else I can do about it?
I have OSX 10.10.3 and Safari 8.0.5.
Aucun commentaire:
Enregistrer un commentaire