I'm using Reactive Extension DOM for listening event from DOM. Here is my sample code:
var input = document.getElementById('test_id');
var source = Rx.DOM.change(input);
var subscription = source.subscribe(
function (x) {
console.log(x);
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
This code works when test_id
is on page when document.ready
finish. But I'm using AJAX request, so test_id
just appears after a time when ajax request is sent and received on client. How can I make RxDom notify this.
Thanks.