I'm getting a Javascript error on the homepage of a site I've developed. On the homepage there is a jCarousel scroller to scroll between profiles.
The error is as follows:
this.clip[0] is undefined
On line 844 of jquery.jcarousel.js.
And the URL is http://www.professionalgirlfriends.co.uk - Excuse the subject matter, as it's an escort website.
Any idea what's up?
Btw, I had the same problem, and it was I had div tags instead of ul tags:
I actually just fixed it myself. The thing that was causing the issue is as follows:
In one of my Javascript files, I have the following code:
// Load jCarousel on homepage only
if($('#home').length) {
jQuery('.view-content').jcarousel();
}
This code is there to load the jcarousel on just the homepage. The thing that was causing the issue is I wasn't being specific enough when I was triggering the jcarousel. In other words, there was more than one .view-content
on the page.
I changed it to:
// Load jCarousel on homepage only
if($('#home').length) {
jQuery('#block-views-escorts-block_1 .view-content').jcarousel();
}
All sorted now though!
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With