Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($){
- $(document).ready(function() {
- /**
- * Hook into ImageView initialize method
- */
- wp.hooks.addAction('Huddle.CommentView.initialize', function (view) {
- view.messageAfterFirstComment();
- });
- /**
- * Extend the original comment view
- * Here we can add our own functions, events, whatever we like.
- */
- _.extend(Huddle.CommentView.prototype, {
- // add message function
- messageAfterFirstComment: function () {
- this.listenTo(this.model.items, 'successOnSave', function () {
- // (optional) wait a specific amount of time
- _.delay(_.bind(function(){
- this.model.trigger( 'hideClick', this );
- }, this), 500);
- });
- }
- });
- });
- }(jQuery));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement