Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
Am working on a slideshow and using an XSLT . But i dont know how i will get my Div Id to imcrement since for each div it uses the same ID(fragment-1) and for each loop it needs to increment from (div id=fragment-1, div id=fragment-2 and so on).
Anyone can help me out on this?
Fuji
Hi Fuji
In your loop I suppose you should use position() to make sure the div's have unique id's.
for instance like this...
<xsl:for-each select="yourstatement"> <div id="fragment-{position()}"> <!-- HTML code --> </div></xsl:for-each>
Is this what you're thinking about?
/Jan
Awesome, just found this and it solved my problem!
Thanks Jan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
jquery Slideshow
Hi All,
Am working on a slideshow and using an XSLT . But i dont know how i will get my Div Id to imcrement since for each div it uses the same ID(fragment-1) and for each loop it needs to increment from (div id=fragment-1, div id=fragment-2 and so on).
Anyone can help me out on this?
Fuji
Hi Fuji
In your loop I suppose you should use position() to make sure the div's have unique id's.
for instance like this...
<xsl:for-each select="yourstatement">
<div id="fragment-{position()}">
<!-- HTML code -->
</div>
</xsl:for-each>
Is this what you're thinking about?
/Jan
Awesome, just found this and it solved my problem!
Thanks Jan
is working on a reply...