jquery plugin extensability#989
jquery plugin extensability#989tuler wants to merge 1 commit intotwbs:2.0-wipfrom tuler:jquery-plugin-extensability
Conversation
this enhances plugin extensability, forwarding all parameters to the plugin method
|
bootstrap plugins are designed to only ever accept one argument. More than that should be passed via an object literal |
|
What do you mean by "passed via an object literal"? Just to clarify the issue, I wanted to implement a new method to the carousel, so I extended the plugin and added a "go" method, which should receive the destination as a parameter. But the extra parameter wasn't being forwared by the plugin. How do I make this kind of extension via an object literal? |
|
Ahh i see - hm... let me think about it |
|
The goto functionality is now supported by the carousel plugin. To use it - just call carousel with a frame index like this: $('#myCarousel').carousel(3)I think i'm going to hold off on calling the constructor with arguments like this proposal for now unless another similar issue comes up. thanks! |
|
Ok, pulled and tested. Thanks. |
|
Any possibility of re-opening this? I have just started working with Bootstrap and find that I've had to add a lot of functionality to several of the plugins, but none of this functionality is really something that anyone else would really want as it is specific to our apps. Its not a big deal to make the necessary change to the constructors, but I would think that others may want this functionality as well to avoid ever touching the plugins themselves. |
This enhances jquery plugin extensability, forwarding all parameters to the plugin method.