Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9229413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:33:56+00:00 2026-06-18T05:33:56+00:00

In another post ( jQuery FlexSlider hide Slider but retain visibility of Manual Controls

  • 0

In another post (jQuery FlexSlider hide Slider but retain visibility of Manual Controls), the user LJ902 answered how you link to a specific image in the Flexslider. And it works perfectly, but only if the link is located in the same page as the images.

What I would like to have: On the front page, have a bunch of image miniatures.. and when you click one of them, you get to a new page with alle images shown in the Flexslider, and selected is the image the user chose on the front page.

This is the code for the link and images. Notice the “rel” in the link:

<a rel="0" class="slide_thumb" href="#">slide link 1</a>
<a rel="1" class="slide_thumb" href="#">slide link 2</a>
<a rel="2" class="slide_thumb" href="#">slide link 3</a>

<div class="flexslider">
<ul class="slides">
    <li>
        <img src="demo-stuff/inacup_samoa.jpg" />
        <p class="flex-caption">Captions and cupcakes. Winning combination.</p>
    </li>
    <li>
        <a href="http://flex.madebymufffin.com"><img src="demo-stuff/inacup_pumpkin.jpg"       /></a>
        <p class="flex-caption">This image is wrapped in a link!</p>
    </li>
    <li>
        <img src="demo-stuff/inacup_donut.jpg" />
    </li>
    <li>
        <img src="demo-stuff/inacup_vanilla.jpg" />
    </li>
    <li>
        <img src="demo-stuff/inacup_vanilla.jpg" />
    </li>
  </ul>
 </div> 

And this is the script:

<script type="text/javascript" charset="utf-8">
jQuery(document).ready(function($) {

$('.flexslider').flexslider({
    animation: "slide",
    slideshow: false,
    animationLoop: false,
    directionNav: true,
    slideToStart: 0,
    start: function(slider) {
        $('a.slide_thumb').click(function() {
            $('.flexslider').show();
            var slideTo = $(this).attr("rel")//Grab rel value from link;
            var slideToInt = parseInt(slideTo)//Make sure that this value is an integer;
            if (slider.currentSlide != slideToInt) {
                slider.flexAnimate(slideToInt)//move the slider to the correct slide  (Unless the slider is also already showing the slide we want);
            }
        });
    }

});

});

And as I said, the above works fine if the links are in the same page as the Flexslider.

But I would like for the link to be on a front page, and the link would then have to link to another page, like:

<a rel="0" class="slide_thumb" href="mySubpage">slide link 1</a>

But the above fails, as I only get to the subpage, without the right image being shown (it always shows the first one).

If anybody could give me a hint how to resolve this, I would be very grateful 🙂

Thanks,

V.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:33:57+00:00Added an answer on June 18, 2026 at 5:33 am

    What you need to do is to pass a parameter between the two pages:

    <a rel="0" class="slide_thumb" href="yourpage?img=0">slide link 1</a>
    <a rel="1" class="slide_thumb" href="yourpage?img=1">slide link 2</a>
    

    the parameter here has the name img and the value is the same as the rel attribute (which you don’t need anymore). On the target page you’ll add a logic to get the url parameter, for example like this:

    function getQueryParams(qs) {
        qs = qs.split("+").join(" ");
        var params = {},
            tokens,
            re = /[?&]?([^=]+)=([^&]*)/g;
    
        while (tokens = re.exec(qs)) {
            params[decodeURIComponent(tokens[1])]
                = decodeURIComponent(tokens[2]);
        }
    
        return params;
    }
    
    // assoziative object the key is the get parameter name
    var $_GET = getQueryParams(document.location.search);
    
    // now you only have to modify the line:
    // var slideTo = $(this).attr("rel")//Grab rel value from link;
    // like this:
    var slideTo = (($_GET['img']) ? $_GET['img'] : 0);
    // if img parameter is set, you slide to it, fallback is the first one.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read another post/question regarding jquery variables and it was useful but I'm
As another post I've made noted, I don't have much experience with jQuery, and
I discovered Microsoft's .Net charting controls from another post here, and so far I
Below is the code for Ctrl + F (from another SO post). But how
I recently saw this code on another post ( jQuery Set Cursor Position in
The answer in this post Use jQuery to check if a URL on another
Is it possible to redirect to another page after a jquery post to the
Hey everyone. I saw another post on using a specific jQuery UI tab to
I created a simple jQuery post that returns data every time an user types
I want to call function using post inside another jquery post like below, <script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.