• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1112
  • Last Modified:

Uncaught TypeError: Object [object Window] has no method 'load'

I'm getting an error from the chrome javascript console, have no idea why???

can anyone assist me please...?

Many thanks

<script type="text/javascript">// <![CDATA[
			$j(window).load(function() {
				$j('.flexslider').flexslider();
			});
// ]]></script>
<!-- Markup for Slide animation  -->
<script type="text/javascript">// <![CDATA[
			$(window).load(function() {
				$('.flexslider').flexslider({
				  animation: "slide",
				  controlsContainer: ".flexslider-container"
			  });
			});
// ]]></script>

Open in new window

0
rafique12
Asked:
rafique12
1 Solution
 
leakim971PluritechnicianCommented:
Replace your code by this :
<!-- Markup for Slide animation  -->
<script type="text/javascript">// <![CDATA[
			jQuery(window).load(function() {
				jQuery('.flexslider').flexslider({
				  animation: "slide",
				  controlsContainer: ".flexslider-container"
			  });
			});
// ]]></script>

Open in new window

Provide a link to your page
0
 
Chris StanyonCommented:
Your jQuery object has been assigned to $j instead of just the $, maybe to prevent conflict with other frameworks. You need to use that when calling jQuery. Just replace $ with $j

$j(window).load(function() {
    $j('.flexslider').flexslider({
        animation: "slide",
        controlsContainer: ".flexslider-container"
    });
});

Open in new window


Looking at your code, you also seem to be calling the flexslider twice in separate load() functions. Not sure why, but probably no need.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now