Re:Ask HN: JavaScript framework that I can use “right now”?
by sbank on Monday August 24, 2015 @09:59AM
(#10109717)
Thanks a lot for the detailed response! I'm a Rails developer myself, and have recently become increasingly interested in front end development. Have tried to embrace React et al. but am not convinced that it's what I need.
Simple example:
So if you load in content via AJAX (I do this a lot for table views of data and the user wants to see a single record), rather than go to a separate page, I do an ajax call, put the result into a Twitter bootstrap modal, show the modal, and when the bs.modal.shown event fires, that "single javascript function" with the modal as the parameter is called, and it initializes all the javascript needed for that particular DOM container.Example:
The general_init function will initialize all my selectize elements (among other things) as such: So when writing forms, lets say to create a new "Event Ticket" I simply plop in a text field with a class of "guest-select" and I instantly have an AJAX powered search field to find/create a guest to assign that ticket to.