Hi sini-Kit

> it works for 1-5 images. to make it work for any number of images it is
necessary to know the number of attributes "im" how can I count them?
and it work only with external images....

One way would be to repeatedly call getAttribute("im" + count) in a loop
until you get back undefined.

To work with internal images you'd need to have your widget generate
<$image> widgets instead of HTML <img> elements.

Best wishes

Jeremy.



On Tue, Feb 10, 2015 at 5:29 PM, sini-Kit <[email protected]> wrote:

> Thank you it works! I make macros here is the demo
> http://novye-podarki.ru/heeg.html#test2
> I paste this slider with the code <$slider
> im1="images/products/products_big/418.jpg"
> im2="images/products/products_big/419.jpg"
> im3="images/products/products_big/420.jpg" />
> it works for 1-5 images. to make it work for any number of images it is
> necessary to know the number of attributes "im" how can I count them?
> and it work only with external images....
>
>
> вторник, 10 февраля 2015 г., 13:30:24 UTC+3 пользователь Jeremy Ruston
> написал:
>
>> Hi sini-Kit
>>
>> If you're creating a widget that needs to generate an HTML string then
>> you can use innerHTML. For example:
>>
>> /*
>> Render this widget into the DOM
>> */
>> AddUpWidget.prototype.render = function(parent,nextSibling) {
>>  this.parentDomNode = parent;
>>  this.computeAttributes();
>>  this.execute();
>> var divNode = this.document.createElement("span");
>>  divNode.innerHTML = this.currentSum;
>>  parent.insertBefore(divNode,nextSibling);
>>  this.domNodes.push(divNode);
>> };
>>
>> You'll need to use the wrapper element to have something to assign the
>> HTML string to.
>>
>> Best wishes
>>
>> Jeremy.
>>
>>
>>
>>


-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to