I see. Not sure why it doesn't work, this would require some additional 
tweaking, but as you have the solution, this is not necessary for now.

>  I don't really understand why it works at all 

Well, in the code you cited, event handling is added separately. As you can 
see in the line 94, the button is added with a "newsubitem" class. If you 
search the code for this subline, you'll find the line 128:

b.find('.newsubitem').click(config.macros.newTiddler.onClickNewTiddler);

the first part (b.find('.newsubitem')) is looking for the items with this 
class (using jQuery I guess [1]), and the ".click" should be adding the 
onclick handler [2] (though, commonly bind [3] is used for such things - 
one functions for all/most of the events). (some version of) jQuery is 
embedded into TiddlyWiki.

[1] http://api.jquery.com/find/
[2] http://api.jquery.com/click/
[3] http://api.jquery.com/bind/

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to