Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. (function($){
  2. $(document).ready(function() {
  3.  
  4. /**
  5. * Hook into ImageView initialize method
  6. */
  7. wp.hooks.addAction('Huddle.CommentView.initialize', function (view) {
  8. view.messageAfterFirstComment();
  9. });
  10.  
  11. /**
  12. * Extend the original comment view
  13. * Here we can add our own functions, events, whatever we like.
  14. */
  15. _.extend(Huddle.CommentView.prototype, {
  16. // add message function
  17. messageAfterFirstComment: function () {
  18. this.listenTo(this.model.items, 'successOnSave', function () {
  19. // (optional) wait a specific amount of time
  20. _.delay(_.bind(function(){
  21. this.model.trigger( 'hideClick', this );
  22. }, this), 500);
  23. });
  24. }
  25. });
  26. });
  27. }(jQuery));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement