Re: [tw] visual confirmation of script button / label click
FND, Maybe its an inappropriate place to bring up but, i don't understand the rationale behind your code: jQuery(place).fadeOut(function(ev) { jQuery(this).fadeIn(); }); To me, the fadeOut value is set using a function which calls fadeIn. Bizaario. How does it really work? Where do i go to find out why this makes sense? (being an FND output, i assume it does). I am getting js more and more now, but this in bending my mind. Alex On 19 December 2010 08:14, FND f...@gmx.net wrote: there's no visual indication that the script has run [...] is there any way to animate the button/label clicking event? If I recall correctly, InlineJavascriptPlugin provides a place variable for the button - so you could do something like this: jQuery(place).fadeOut(function(ev) { jQuery(this).fadeIn(); }); Instead of fadeOut/In, you might use slideUp/Down, or add a class, or perhaps some custom animation*. Ideally, the reset (in this case, fadeIn) would be triggered at the end your script. -- F. * http://api.jquery.com/category/effects/ -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlyw...@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.comtiddlywiki%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en. -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlyw...@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
Re: [tw] visual confirmation of script button / label click
Thanks FND, very helpful best wishes Alex On 20 December 2010 12:56, FND f...@gmx.net wrote: i don't understand the rationale behind your code: [...] To me, the fadeOut value is set using a function which calls fadeIn. http://en.wikipedia.org/wiki/Callback_(computer_science) We're passing in a function as an argument*. This function will be executed once (IOW deferred until) the fadeOut animation has completed. Since that's an asynchronous operation, we can't just provide a sequence of statements like fadeOut(); fadeIn();. Because of its non-sequential nature, asynchronous programming can seem a little weird at first (and, with JavaScript, often requires a good understanding of closures and variable scope), but it's not so bad once you wrap your head around it. -- F. * FWIW, it might be less confusing this way: var callback = function(ev) { jQuery(this).fadeIn(); }; jQuery(place).fadeOut(callback); -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlyw...@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.comtiddlywiki%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en. -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlyw...@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
Re: [tw] visual confirmation of script button / label click
there's no visual indication that the script has run [...] is there any way to animate the button/label clicking event? If I recall correctly, InlineJavascriptPlugin provides a place variable for the button - so you could do something like this: jQuery(place).fadeOut(function(ev) { jQuery(this).fadeIn(); }); Instead of fadeOut/In, you might use slideUp/Down, or add a class, or perhaps some custom animation*. Ideally, the reset (in this case, fadeIn) would be triggered at the end your script. -- F. * http://api.jquery.com/category/effects/ -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlyw...@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] visual confirmation of script button / label click
I have a script: script label=button label title=this text appears on mousover code goes here /script that works just fine, except there's no visual indication that the script has run (it writes something to a remote tiddler). I don't want a message window opening that I'd have to click, but is there any way to animate the button/label clicking event? Maybe something like a momentary un-highlighting of the label (as it highlights when you mouse-over to click it)? Any suggestions? -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlyw...@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.