Ask questions and get good answers on mb.jQuery.components

I have a container, and just when iconized i wanna use the .mb_changeContainerContent(url,data) to change the content;

How can i do this?

Thanks

asked May 11 '10 at 21:05

matz's gravatar image

matz
111

edited May 11 '10 at 21:08

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129


there’s a onIconize callback function where you can pass whatever you need; it get one argument (o) rapresenting the referred container.

$('#myContainerID').buildContainers({
   ...,
   onIconize:function(o){
      o.mb_changeContainerContent('yourContent.url',"dataToBePassed");
   },
   ...
});

If you have more than one container on your page but you need to add the event to a specific one you should init this separately:

$('#myContainerID').buildContainers({
   ...,
   onIconize:function(o){
      o.mb_changeContainerContent('yourContent.url',"dataToBePassed");
   },
   ...
   });
$(".mbContainer").buildContainers({
   ...,
   ...,
   ...
});

Even if your container has the same class of the others it will be skipped by the second initialization. Otherwise you can add your own custom class to initialize each specific containers (doesn’t need to use “mbContainer”).

answered May 11 '10 at 21:07

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×3
×1

Asked: May 11 '10 at 21:05

Seen: 312 times

Last updated: Aug 04 '10 at 00:23

jQuery main site - Matteo Bicocchi