use Ox.$ and .on
This commit is contained in:
parent
4dd3dde24e
commit
0dd96d8080
1 changed files with 8 additions and 6 deletions
|
@ -270,7 +270,7 @@ Ox.Input = function(options, self) {
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.$input = $(self.options.type == 'textarea' ? '<textarea>' : '<input>')
|
self.$input = Ox.$(self.options.type == 'textarea' ? '<textarea>' : '<input>')
|
||||||
.addClass('OxInput OxMedium Ox' + Ox.toTitleCase(self.options.style))
|
.addClass('OxInput OxMedium Ox' + Ox.toTitleCase(self.options.style))
|
||||||
.attr({
|
.attr({
|
||||||
disabled: self.options.disabled,
|
disabled: self.options.disabled,
|
||||||
|
@ -285,9 +285,11 @@ Ox.Input = function(options, self) {
|
||||||
} : {})
|
} : {})
|
||||||
)
|
)
|
||||||
.val(self.options.value)
|
.val(self.options.value)
|
||||||
.blur(blur)
|
.on({
|
||||||
.change(change)
|
blur: blur,
|
||||||
.focus(focus)
|
change: change,
|
||||||
|
focus: focus
|
||||||
|
})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
|
|
||||||
if (self.options.type == 'textarea') {
|
if (self.options.type == 'textarea') {
|
||||||
|
@ -329,7 +331,7 @@ Ox.Input = function(options, self) {
|
||||||
|
|
||||||
if (self.hasPasswordPlaceholder) {
|
if (self.hasPasswordPlaceholder) {
|
||||||
self.$input.hide();
|
self.$input.hide();
|
||||||
self.$placeholder = $('<input>')
|
self.$placeholder = Ox.$('<input>')
|
||||||
.addClass('OxInput OxMedium Ox' +
|
.addClass('OxInput OxMedium Ox' +
|
||||||
Ox.toTitleCase(self.options.style) +
|
Ox.toTitleCase(self.options.style) +
|
||||||
' OxPlaceholder')
|
' OxPlaceholder')
|
||||||
|
@ -341,7 +343,7 @@ Ox.Input = function(options, self) {
|
||||||
width: self.inputWidth + 'px'
|
width: self.inputWidth + 'px'
|
||||||
})
|
})
|
||||||
.val(self.options.placeholder)
|
.val(self.options.placeholder)
|
||||||
.focus(focus)
|
.on({focus: focus})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue