View Full Version : Using Jquery Carousel in Extjs 4.0 MVC

27 Oct 2012, 6:10 PM
Hi, I am new to EXTJS and have been building an app that requires heavy user interaction. First of the list i want to implement a jquery carousel in my extjs application. I want to add this carousel


This is what i have so far. I am just building a view that will have a list of images displayed from a store.

extend: 'Ext.view.View',
alias: 'widget.memeimagestrip',
region: 'north',
cls: 'imageSlider',
height: 75,
id: 'someid',
store: 'Genimg',
autoScroll: true,
tpl: [
'<tpl for=".">',
'<div class="thumb-wrap" id="{name}">',
'<div class="thumb"><img src="{url}" title="{name}" width="60" height="60"></div></div>',
itemSelector: 'div.thumb-wrap',

afterRender: function() {
console.log('After render fired');

This is the error i am getting.

Uncaught TypeError: Cannot read property 'offsetWidth' of undefined

I am not sure why i am getting it. Can somebody please help.


29 Oct 2012, 6:25 AM
Have you tried it after the callParent?

James Goddard
29 Oct 2012, 8:31 AM
You may need to do this on a refresh event not render. You can get the render before the data is loaded. Also you are loading the carousel on the panel, not on the body. You probably want to do it on the panel's body element.