Reputation: 3953
after upgrade to new worpdress jquery stop working.
Uncaught TypeError: Cannot read property 'expr' of undefined
2
Uncaught TypeError: Property 'jQuery' of object [object Window] is not a function www.xxx.si:313
Uncaught TypeError: Property 'jQuery' of object [object Window] is not a function thickbox.js:18
Uncaught TypeError: undefined is not a function jquery.form.min.js:12
Uncaught TypeError: undefined is not a function scripts.js:3
Uncaught TypeError: Property 'jQuery' of object [object Window] is not a function
Uncaught TypeError: Property 'jQuery' of object [object Window] is not a function
details for example:
cannot read property 'expr' of undefined
jQuery.extend(jQuery.expr[':'], {
undefined is not a function scripts.js:3
$(function() {
what is wrong? how can I solve this?
EDIT:
Mat help me to find this noConflict jquery which is part of event calendar plugin
// jQuery DOM extreme protection management
$options = get_option('optionsEventsCalendar');
echo ' <script type="text/javascript">',"\n\t";
echo '// <![CDATA[',"\n\t";
echo 'var ecd = {};',"\n\t";
echo 'ecd.jq = jQuery.noConflict('.$options['jqueryextremstatus'].');',"\n\t";
echo '//]]>',"\n";
echo ' </script>',"\n";
echo "<!-- End Of Script Generated By Events-Calendar - ".EVENTSCALENDARVERS." -->\n";
Upvotes: 1
Views: 343
Reputation: 16561
Your code on www.mdns-maribor.si uses $.noConflict:
<script type="text/javascript">
// <![CDATA[
var ecd = {};
ecd.jq = jQuery.noConflict(true);
//]]>
</script>
This will remove the jQuery
and $
variables. You don't need jQuery.noConflict unless you want to override the jQuery
and $
values. If you do need it wait until the rest of the code has run before calling it.
Upvotes: 1
Reputation: 150118
It looks like your upgrade somehow removed your include of the jQuery source code.
Check out the part of your solution where you include it.
The smoking gun is
Property 'jQuery' of object [object Window] is not a function
Your code is calling jQuery, but JavaScript tells you that it is not defined.
Upvotes: 0