I've tried to do this several times, and so far I can only get my content slide to randomize the order in which the slides are displayed to the user. What i mean by that is that it keeps the same order, but just displays them randomly. I actually need the ORDER of the slides randomized on page load. For example, I have a ul like so:
<ul class="rotator">
<li>Slide 1</li>
<li>Slide 2</li>
<li>Slide 3</li>
<li>Slide 4</li>
<li>Slide 5</li>
</ul>
And then a pager that is created on the fly below it that allows the user to go back and forth between slides
<div class="rotatorNavigation>
<a href="#" name="1">1</a>
<a href="#" name="2">2</a>
<a href="#" name="3">3</a>
<a href="#" name="4">4</a>
<a href="#" name="5">5</a>
</div>
I want the pager order to remain the same, as in 1-5, but the slides I want those to be random. So when you load the page, your order could be like 2,5,3,4,1 OR if you refresh again, your order could be 3,5,1,2,4 etc...
Right now, the jquery we have is like so:
/**
* Prepare a rotator
* @return null
*/
(function($)
{
$.fn.prepRotator = function()
{
return this.each(function()
{
// Set the navigation
var count = $(this).children().length;
for (i = 1; i <= count; i++)
{
$(this).siblings('#rotatorNavigation').append("<a href='#' name='" + i + "'>" + i + "</a>");
I think maybe loop is the wrong term, but I am trying to cycle through a series of sliding divs, based on what link is clicked inside the divs. If you click the following path:
Menu button (which I have to click twice for some reason)
More articles >
then the back << arrows at the top
and then try and click More articles > again it doesnt work, its like it doesnt reset..
here is a fiddle with what I have so far.. any help would be great - as well as explanations so I can learn from this...
Having some issues with my click/toggle function for my tabs. We are doing a "tabbed" navigation which also does "next/previous" to go back and fourth between the tabs. The tabs should open when clicked, and close when clicked - however they should remain open when you click on different tabs if you have one tab open already.
It seems really shotty and I think its because the function 1) I'm not great at jquery and 2) I think its getting confused when you click on a tab while a tab is already open. The page also seems to be dropping down to the "anchor" location. The link is here and my code for the tabs and next/prev and the toggle for the tab content is below
We have a lightbox slider on our website, and it contains a little carousel at the bottom with clickable images. When you click one, it displays larger in the center of the lightbox.
I'm trying to add next/prev actions to the thumbnail carousel slider, so that a user can click next, and see 5 more thumbnails they could potentially click on.. if that makes sense.
I have a hopefully quick question about using the mobile swipe function for mobile jquery. We have a gallery here http://www.grandhotel.com/the-hotel#72157623428872151&7142284101 and I've got it so that the larger image swipes left and right, BUT I also want those thumbnail images to be "swipeable" too.. the code that controls the thumbnails is:
When a thumbnail is clicked on the larger version of that photo becomes the "current" photo and = is faded in/out etc.. you can see via the link about how it all works.
I know I need to add a "swipeleft" and "swiperight" in there, but the code was developed by a pervious developer and I can't seem to get it in the right order think.
I'm trying to achieve the same effect that a click gives a person on a computer, but do it ALSO via swiping on an ipad/iphone. This is currently what my function looks like (this is for an image slider)
I basically want people to be able to "swipe" their finger across the screen and have the same transition happen as "click" if that makes sense. I've tried a few jquery plugins to achieve the concept, but I'm not very fluent with jquery so I can' t seem to get this working.
I hopefully have a simple question. We have a jquery slider, which is more fo a carousel, that consumes the entire height/width of the page. The slider works great on page load, however, when you adjust your viewport's height after the first initial slide, the div containing the content moves out of place and the slide arrows move around.
I'm wondering if there is a simple solution to this to have the sizes all adjust on page load AND window resize..