Plugin sub functions

Plugin sub functions

Hi,

I'm trying to get a simple plugin for jquery going, my desired end result is this:

$('#mydiv').counter({options...});
$('#mydiv').counter.add(1);
$('#newdiv').counter();
$('#mydiv').counter.add(1);
$('#newdiv').counter.remove(1);

Can jQuery do this? If not is there a way that is just as good? I've tried a few methods, including using bind/trigger events but the ids conflicted...