(function ($) {
var element;
$.fn.pull_todo_count = function () {
var a = $('
0 pending applications');
a.attr("href", "/process/todo_list");
a.appendTo($(this));
$(this).hide();
element = $(this);
timerRequestData();
};
function timerRequestData() {
$.ajax({
} url:'/pull_todo_count',
type:'get',
data:nu ll,
dataType:'json',
success:function(data){
var count = data["todo_count"];
console.log(count);
if(count > 0){
. element.hide();
}
Template html code
Copy code