Hi Arc

As you're probably beginning to learn, TiddlyWiki isn't really like a
conventional web page because of the way that everything is generated
dynamically.

There are other subtleties, too - for instance, it's not a good idea to use
IDs to identify DOM elements because a tiddler can be rendered multiple
times simultaneously (for instance, if a tiddler is displayed in its own
right and also displayed as a transclusion within another tiddler).

I'd recommend exploring how macros are implemented in TW. They give you a
clean way to write code that generates DOM content, with a well defined
interface. The built-in slider macro is similar to your example.

Best wishes

Jeremy



On Fri, Feb 15, 2013 at 9:17 AM, Arc Acorn <[email protected]> wrote:

> I don't seem to be able to understand how to use Jquery in Tw at all...
> Dose anybody know any good references?
>
> As a simple test I have tried to simply make a div hide when clicked.
> I have tried inline like this (With the inline JavaScript plugin
> installed):
> <script>
> (function($) {
> $(document).ready(function(){
>   $("#note").click(function(){
>     $(this).hide();
>   });
> });
> })(jQuery);
> </script>
>
> <html>
> <div id="note">I am note</div>
> </html>
>
> I have tried putting:
> (function($) {
> $(document).ready(function(){
>   $("#note").click(function(){
>     $(this).hide();
>   });
> });
> })(jQuery);
>
> In a tiddler and tagging it as systemConfig...
>
> I have tired putting it in a markup post/pre tiddlers, I have tired
> every variation of everything I can think of or find and I can't get it to
> work.
>
> --
> 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.
>
>
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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