Is it possible...

  • CoreyBstn
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 3 weeks ago #5987 by CoreyBstn
Is it possible... was created by CoreyBstn
I would like the image order to be random in the slider.

In other words, if a user comes to the site, the effects slider starts and begins with image 1. If they move to another part of the site and then return to the home page (location of slider module), it reloads and starts with image 1 again.

Is there a way to randomize this? So if a user returns to the home page, let's say that image 4 loads first, then another random image, etc...

Thanks for any and all help!!

Please Log in to join the conversation.

  • CoreyBstn
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 3 weeks ago #5988 by CoreyBstn
Replied by CoreyBstn on topic Re: Is it possible...
Oops...I forgot, here is the site I am working on with the client, this is only "live" in the design sense so they can view it as I go along. It is not on their host yet.

www.gullwingshoresonline.com/hhg2/

thanks again

Please Log in to join the conversation.

More
13 years 3 weeks ago #5992 by ivan.milic
Replied by ivan.milic on topic Re: Is it possible...
Hi,

That can be done but you must change script in order of adding that functionality.

In mod_hot_effects_rotator/js/jquery.nivo.slider.js
there is internal variable named "currentSlide". You can store it's value in cookie when user leaves the page (window.onbeforeunload = function(){...}).
You can check the if that cookie is present and if yes, set currentSlide to it's value rather than 0;
var currentSlide = 0;

Also here is useful link that describes cookie use:
www.w3schools.com/JS/js_cookies.asp

I hope this advice will help you.
The following user(s) said Thank You: CoreyBstn

Please Log in to join the conversation.

  • CoreyBstn
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 3 weeks ago #5997 by CoreyBstn
Replied by CoreyBstn on topic Re: Is it possible...
Thank You Ivan!!

I will check this out and implement it and also read that cookies article.

I appreciate your taking the time to reply!

CoreyBstn

Please Log in to join the conversation.

Time to create page: 0.321 seconds
Powered by Kunena Forum