Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to create jQuery UI stuff in templates? #37
I like the templating thing, but I want to create a little bit more complex UI, eg. using jQuery sliders in the templates or using min-max values for textboxes (via jstepper) etc.
My problem is that neither via Helpers nor via delegates I can't achieve this.
My example code is (SORRY, I don't know why does gitHub screw the formatting!):
When the setMinAndMax values are executed, jQuery can't find the elements defined in the selector.
Via the "on" I can't make it work to fire when the textboxes are displayed (via the templates).
I know that helpers are for generating output, but I think it would be much better to hold the template and jquery ui-displaying code in one place, than separated all over.
I'd appreciate any replies.
I agree, packaging the code and templates together is important and that is what the presenter concept is about. I am working on the beta version at the moment, and this will include more support for this. I will come back to this issue, after JsRender beta is out, to include this scenario support in the subsequent JsViews beta....
This functionality is now available through JsViews Tag Controls.
Two examples are available in the current samples.
More to follow...
Closing this issue, but further feedback welcome. Please reopen if you want to discuss the scenario further...