use Ox.$ and .on

This commit is contained in:
rolux 2013-12-06 21:17:39 +01:00
parent 4dd3dde24e
commit 0dd96d8080

View file

@ -270,7 +270,7 @@ Ox.Input = function(options, self) {
.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))
.attr({
disabled: self.options.disabled,
@ -285,9 +285,11 @@ Ox.Input = function(options, self) {
} : {})
)
.val(self.options.value)
.blur(blur)
.change(change)
.focus(focus)
.on({
blur: blur,
change: change,
focus: focus
})
.appendTo(that);
if (self.options.type == 'textarea') {
@ -329,7 +331,7 @@ Ox.Input = function(options, self) {
if (self.hasPasswordPlaceholder) {
self.$input.hide();
self.$placeholder = $('<input>')
self.$placeholder = Ox.$('<input>')
.addClass('OxInput OxMedium Ox' +
Ox.toTitleCase(self.options.style) +
' OxPlaceholder')
@ -341,7 +343,7 @@ Ox.Input = function(options, self) {
width: self.inputWidth + 'px'
})
.val(self.options.placeholder)
.focus(focus)
.on({focus: focus})
.appendTo(that);
}