(function($){
$.fn.countdown = function(){
var current = 5;
function count(){
this.text(current);
}
count();
}
})(jQuery);
Why in this plugin I'm getting a console error Uncaught TypeError: Object [object global] has no method 'text'.
But if i declare this as a variable outside of the count function,
for example var this_selected = this; and then use it inside the count function then it is working.