Executing methods with parameters
JQuery widgets allows you to execute methods on the instance and pass parameters to those methods for example: $( "#elem" ).progressbar( "value", 40 ); will execute the 'value' and pass the 40 to the function.
How can I achieve the same with backbone.widget?
I noticed on:
https://github.com/meleyal/backbone.widget/blob/630dfca4abd9d9bc7fe88ca902f5821ed64b5794/backbone.widget.js#L45
that the method being executed on the widget is invoked but where are the parameters passed?
Is this not supported in backbone.widget?
Thanks
No, passing arguments is not currently supported. This should be pretty easy to add though if you'd consider making a pull request?
I think we may not need this feature since there is a way of getting the widget instance. This is how I have I implemented what I needed:
var wgtInstance = $( "#elem" ).data( "progressbar" );
if(wgtInstance){
wgtInstance.value(40);
}