My JavaScript Code:
$("#carousel").jCarouselLite({
visible: 4,
btnNext: ".next",
btnPrev: ".prev",
circular: false
});
Why do i get this error?
Uncaught TypeError: Cannot read property 'offsetWidth' of undefined
widthjcarousellite_1.0.1.min.js:1
$.fn.jCarouselLitejcarousellite_1.0.1.min.js:1
e.extend.eachjquery.min.js:16
e.fn.e.eachjquery.min.js:16
$.fn.jCarouselLitejcarousellite_1.0.1.min.js:1
(anonymous function)home.js:4
f.extend._Deferred.e.resolveWithjquery.min.js:16
e.extend.readyjquery.min.js:16
c.addEventListener.B
Ok, I may have found your problem, it’s probably ASP related.
When the language is changed, there are no elements in the
<ul>in<div id='carousel'>. I’m almost certain that this is causing Carousel to fail. Please make sure this code:<asp:Repeater runat="server" ID="Repeater_Videos">always returns elements, and then try again.