When to connect jQuery plugins in Backbone mode

I am trying to find the best and most inexpensive way to plug in jQuery plugins and some basic user interface customization features.

Currently, I can present two ways:

1) Render the function after rendering the view. This means that every time a view is visualized, plugins, etc. Join again. Could this cause memory, etc.?

2) Somehow mimic jQuery.live () for plugins ... I don't know if it's even possible

Any ideas?

+4
source share
1 answer

Keep in mind that jQuery.live deprecated and jQuery.on should be used jQuery.on , see http://api.jquery.com/delegate/ In any case, you can find some interesting solutions here: Detecting changes to the contents of an element using jQuery

0
source

Source: https://habr.com/ru/post/1396420/


All Articles