• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: 2 Cycle Galleries, One Page
PostPosted: Wed Jan 08, 2020 4:26 pm 
Offline
New Member
New Member

Joined: Fri Aug 09, 2019 7:28 pm
Posts: 5
I am trying to do a before and after of 2 cycle galleries on one page.
Here is what I have tried:
1. added the two galleries {Gallery dir='416before'}{Gallery dir='416after'} using same cycle code
2. added the two galleries {Gallery dir='416before'}{Gallery dir='416after'} 2 separate templates, omitting the jquery in the send cycle code
3. adding the two galleries in a cms template to separate, still the after gallery wont rotate...like the javascript is broken.
for the second cycle template I removed the last code section. Suggestions?
\$1:
{* note that the thumbs are shown in stead of the original images, just to make sure all images are of the same size due to the crop image-resize option *}
<div id="slides" style=" margin:auto;width:315px; height:420px;">
{foreach from=$images item=image}
   {if !$image->isdir}
      <img src="{$image->thumb}" alt="{$image->titlename}" />
   {/if}
{/foreach}
</div>

\$1:
/* height and width should be the same as the thumbnail sizes */
#slides {
  max-width: 315px;
  height: 475px;
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
}

\$1:
<__script__ type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></__script>
<__script__ type="text/javascript" src="{$gallery_module_root}/templates/cycle/jquery.cycle.lite.js"></__script>

<__script__ type="text/javascript">
$(document).ready(function() {
   $('#slides').cycle({
      delay:  2000,
      speed: 500,
      before: onBefore
   });

   function onBefore() {
      $('#caption').html(this.alt);
   };
});


Attachments:
help.jpg
help.jpg [ 140.92 KiB | Viewed 297 times ]
Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: 2 Cycle Galleries, One Page
PostPosted: Wed Jan 08, 2020 6:19 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 906
Location: Victoria, BC
Looks like you'd need to give each gallery a unique ID, then either call the script twice or have it apply to both ID's. CSS requires that all IDs be unique, unlike classes.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: 2 Cycle Galleries, One Page
PostPosted: Wed Jan 08, 2020 7:30 pm 
Offline
New Member
New Member

Joined: Fri Aug 09, 2019 7:28 pm
Posts: 5
That is exactly what I wound up doing and it fixed it. Thank you!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting