Преглед изворни кода

support jQuery change event

zhongxingdou пре 11 година
родитељ
комит
97dcced654
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/directives/model/default.js

+ 3 - 0
src/directives/model/default.js

@@ -80,6 +80,9 @@ module.exports = {
 
     this.event = lazy ? 'change' : 'input'
     _.on(el, this.event, this.listener)
+    if (typeof(jQuery) === 'function') {
+      jQuery(el).on('change', this.listener)
+    }
 
     // IE9 doesn't fire input event on backspace/del/cut
     if (!lazy && _.isIE9) {