General developer forum

 
 
This is me.  Deal with it!
Need help with Tabs implementation
 

Hi, 

I've forked the course Overview block to change for our moodle and I'm wanting to wrap the courses in a tab box.

I've been looking through the code and been on the YUI wiki and have created this function.

M.block_course_overview.add_tabs = function(Y) {
M.block_course_overview.Y = Y;
YUI().use('tabview', function(Y) {
var tabview = new Y.TabView({srcNode: '#tabContainer'});
tabview.render();
});
};

in the block I'm trying to call it with the following line

$this->page->requires->js_init_call('M.block_course_overview.add_tabs');

But its not working and moreover it is stopping existing code from working.  I'm doing something wrong but I'm not sure what.  Can anyone help?

Thanks

Kieran

 
Average of ratings: -