You can simplify using this:
$(function () {
// CREATE A NEW BUBBLE
$('.drop').click(function(event){
Bubble(event);
});
var newBubbleId = 0;
function Bubble(event,bubbleClass){
// Create Element
var id = newBubbleId++;
var bubble = $('<div class="bubble" id="b_'+id+'" draggable="true"><input id="bubbleText" type="text" name="text" value="'+id+'" /></div>');
$('body').append(bubble);
// Position Element
var bubbleWidth = bubble.width();
var bubbleHeight = bubble.height();
var x = event.pageX - (bubbleWidth*0.5);
var y = event.pageY - (bubbleHeight*0.5);
bubble.offset({top:y, left:x});
bubble.click(function () {
$(this).toggleClass("active");
});
}
});
I see a few other issues. Number ids as mentioned before. Also, all your input elements have the same ID, that is not allowed. One ID per document only. You can use the Name attribute if you want them to have the same name.
Also, your counter function isn't ideal.
But this should solve your problem.
activeclass before you remove it.