Hi Arc,

First of all, I assume you have InlineJavascriptPlugin from TiddlyTools 
installed, otherwise your script markup won't do anything at all.

Secondly, I strongly advise to never use Id's and always use class names.

In TW, you don't use document.ready because TiddlyWiki is already loaded. 
Instead, you just perform the action or function that you need.

For example, this should work in a tiddler...

{{foo button{Toggle foo...}}}
{{{
foo
}}}
<script>
(function($) {
  $(".foo", place)
    .click(function(){
      var $foo = $(this).next().next();
      $foo.css("display") == 'none' ? $foo.slideDown() : $foo.slideUp();
    })
    .css({
      color:'red',
      cursor:'pointer'
    });
})(jQuery);
</script>

You can also invoke JavaScript / jQuery by adding it to some element 
handler, e.g.:

<html>
<span
  class="button"
  onclick="
    var $= jQuery;
    $(this).css('color','red');
  ">
Click to make me red...
</span>
</html>

Cheers, Tobias.

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


Reply via email to