You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/public/javascripts/wechat/directives/multi_reply.js

30 lines
1.2 KiB

/**
* Created by ttang on 2016/9/5.
*/
app.directive('multiReply',["$timeout",function(timer){
return{
restrict: 'A',
scope: {},
link: function(scope, element){
timer(function(){
$(".reply-icons").live("click",function(){
if($(this).hasClass("multi-hide")){
$(".multi-input-container").addClass("undis");
$(".reply-icons").addClass("multi-hide");
$(this).next().next().removeClass("undis");
$(this).next().next().focus();
$(this).removeClass("multi-hide");
$(".post-reply-input").val("");
$("#post_input_1").hide();
}
else{
$(this).addClass("multi-hide");
$(".post-input-container").addClass("undis");
$(".post-reply-input").val("");
$("#post_input_1, #post_input_1 .post-input-container").show();
}
});
})
}
}
}]);