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

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -