javascript - Backbone view to re-render if any other view gets rendered -


I have a tooltip view, when one element is fun with any class .tooltip Takes the content of that element to the data-tooltip and displays it in the tooltip.
I force incidents for TooltipView in the initial function but the problem is that if any other view is dynamically created or re-rendered tooltip view does not know about it var tooltip view = backbone.View Extension ({L: '# tooltip-container', start: function () {$ ('. Tooltip'). ('Mouseover', function () {....}}}

I know that when I sing, I can manually trigger the event from each scene, but is it far from tooltip view to do this?
I wanted to re-submit the TooltipView only To do and then listen to any view to listen.

< P> Perhaps the engagement of events at high DOM level will work for you: initialize: function () {$ ('body'). ('Mouseover', '.tooltip' Function) {....}}

Do not forget to share it later

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -