On Wednesday, February 11, 2015 at 1:03:46 PM UTC-6, sini-Kit wrote: > > I don`t found any information about "instancecount" there is no this word > in tiddlywiki. where can I see how it to use. > > you need to add this in your code :
var Widget = require("$:/core/modules/widgets/widget.js").widget; //code to add $tw.config.imagesliderplugin = {}; $tw.config.imagesliderplugin.instancecount = 0; //end of code to add var AddUpWidget = function(parseTreeNode,options) { this.initialise(parseTreeNode,options); }; then use like this: var Qslid = $tw.config.imagesliderplugin.instancecount++; > среда, 11 февраля 2015 г., 18:33:28 UTC+3 пользователь BJ написал: >> >> within your javascript you can have a global variable and increment that, >> use - >> >> $tw.config.imagesliderplugin.instancecount++ >> >> On Wednesday, February 11, 2015 at 7:56:14 AM UTC-6, sini-Kit wrote: >>> >>> >>> Ok. I have found the next problem . I can`t paste 2 sliders on one page >>>> because their buttons will have the same id . I solve this problem by >>>> adding random number to id. >>>> >>> But I think it is not a good idea (but it works). How can I count how >>> many times macros was run? here is the demo >>> http://novye-podarki.ru/heeg46.html#test2%201 >>> here is my code >>> http://novye-podarki.ru/heeg46.html#%24%3A%2Fcore%2Fmodules%2Fwidgets%2Fimg_slider2.js >>> >> -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.