Supersized gallery – problem with comma
-
I’m using Attachments to show images through the jQuery Supersized image gallery, which is working fine.
There is one issue though, which causes problems in IE. The image output for Supersized shows all images on one line each, ending with a comma – apart from the last line, which doesn’t have a comma. So I was wondering if it’s possible to output all attachments and when getting to the last one, do a slightly modified echo?
This is what I’m using:
$attachments = new Attachments( 'my_attachments', 1301 ); if( $attachments->exist() ) : while( $attachment = $attachments->get() ) : echo "{image : '" . $attachments->src( 'full' ) . "'}," . "\n"; endwhile; endif;
Which gives this:
{image : ‘website/image.jpg’},
{image : ‘website/image.jpg’},
{image : ‘website/image.jpg’},I would like to somehow get rid of that last comma..
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Supersized gallery – problem with comma’ is closed to new replies.