Your fluent APi in html helper is very cool.
Why don't you provide the same approach in javascript side?
For example, I'd like to use the Option API like this:
$("#comboCurrency").igCombo().option().isEnable(false);
But, I need to use Option API like this:
$("#comboCurrency").igCombo("option", "disabled", false);
Hi,
Our countrols are based on jQuery and you can use Fluent API.
If you have igCombo control, you can change option in this way:
// Set
var combo = $("#combo").data("igCombo").option("autoComplete", true) ;
// Get
var combo = $("#combo").data("igCombo").option("autoComplete")
You can find more infromation for how widgets are build here.
Regards,
Stanimir Todorov
Thanks Stanimir, but you're still passing strings instead of just accessing methods and properties the way javascript intended.
You list this:
$("#combo").data("igCombo").option("autoComplete", true) ; //smells, I have to look up the exact spelling and casing of options and methods to use them
Sparkli's syntax is much better :
$("#comboCurrency").igCombo().option().isEnable(false); //works with intellisense & refactoring, hurray!