Hi,
Something like this?
Needs InlineScriptPlugin installed

tiddler: Test

{{count{<<option chkX>><<option chkX1>><<option chkX2>>}}}

<script>
var arr = jQuery('.count').find('.chkOptionInput')
var cnt = 0;

for (var i = 0; i<arr.length; i++) {
    if (arr[i].checked) cnt++;
}

createTiddlyElement(place,"span",null,null, cnt);

</script>
====
{{count{ .. generates a wrapper which can be easily found by jQuery
find('.chkOptionInput') .. ToggleTag uses chkOptionInput
for .. counts the checked boxes.

The only problem may be to get a class named wrapper div or span
around the toggleTags

if you use it inside ViewTemplate it may look like

<div class='count'>
<span macro="toggleTag opt1"></span>
<span macro="toggleTag opt2"></span>
<span macro="toggleTag opt100"></span>
</div>

have fun!
Mario

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to