Instead of creating a jQuery object each time we need them, maybe is better to create all the jQuery selectors once on FindBar.open and save them as properties of FindBar, since these will not change on a single modal bar. Notice that we are creating the same objects several times in the code.