Need direction on jQuery style of coding -


i posted question asking if there way consolidate initialization of typeahead.js + bloodhound controls here: can multiple inputs each using typeahead.js different sources consolidated?.

i have around 10 inputs on single page typeahead-enabled , seemed going call lot of repetitive code.

i came "solution" of sorts posted answer, , works - configuring input easy. realized had fallen old microsoft mfc function call style of having lot of parameters may or may not need along no clear indication of parameters are, betraying 30+ year career visual c++ programmer

i've read through of documentation here: https://learn.jquery.com/about-jquery/ still don't feel have sense of best way address question.

all of sample code i've seen contains 1 typeahead element, approach in "real world" when have page multiple typeahead elements or other similar control requires significant configuration?

i'm new jquery , apply accepted practices as possible, tips or reading suggestions appreciated.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -