D
D
DevOFF2017-01-17 11:52:58
backbone.js
DevOFF, 2017-01-17 11:52:58

backbone events?

Good day to all. I'm using a pseudo select - which is input. In Backbone I'm trying to catch changes - change input . but alas, the backbone does not see these changes. How to be a pseudo select sets the value -

$(this).parents('.drop-menu').find('input').attr('value', $(this).attr('id'));

How to make the backbone catch changes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2017-01-17
@alexey-m-ukolov

It's not clear from the question, but it should be like this:
If for some reason you cannot correct the method of changing the value to the correct one, then the attribute change can be caught through MutationObserver ( caniuse ).

D
DevOFF, 2017-01-17
@DevOFF

The problem was that the change event was expected. But since the select itself is fired and there were ul li elements there, there cannot be such an event. there is a click event.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question