function scnTabMaker(h, i, f) { this.parentControl = h; var d = this; this.width = 250; this.maxTabs = i; this.buttonsControl = this.textControl = this.selectControl = null; this.init = function () { this.buildSelectControl(); }; this.getTotalTabs = function () { return Number(d.selectControl.find("option:selected").val()) }; this.buildSelectControl = function () { // .attr("style", "width:" + this.width + "px") this.selectControl = jQuery("").attr("id", "scn-tab-select").addClass(f ? f : ""); var a = jQuery("").attr("value", "select").attr("selected", "selected").text("Choose a number..."); a.appendTo(this.selectControl); for (var b = 2; b <= this.maxTabs; b++) { a = jQuery("").attr("value", b).text(b); a.appendTo(this.selectControl) } this.selectControl.change(function (c) { (c = d.getTotalTabs()) && d.buildTabButtons(c) // Update the text in the appropriate span tag. var newText = jQuery(this).children('option:selected').text(); jQuery(this).parents('.select_wrapper').find('span').text( newText ); // jQuery( this ).parents( 'tr' ).hide(); }); this.parentControl.append(this.selectControl); }; this.buildTextInputControl = function ( id ) { var labelElement = ''; var inputElement = ''; this.textInputControl = jQuery('