Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Bind Firebase data events
- _bindDataEvents: function() {
- var self = this;
- this._resources.on('child_added', function(resourceSnapshot) {
- $(document).trigger('resource.oneAdded', resourceSnapshot.val());
- });
- this._resources.on('child_changed', function(resourceSnapshot) {
- var resource = resourceSnapshot.val();
- var el = $('#resources a[data-resourcetag="' + resource.tag + '"]');
- if(el.length) {
- self._updateResourceElement(resource, el);
- }
- });
- },
Add Comment
Please, Sign In to add comment