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 7756161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:44:59+00:00 2026-06-01T12:44:59+00:00

I’m using jQuery Blinds Slideshow as image slider. I want to redirect the first

  • 0

I’m using jQuery Blinds Slideshow as image slider. I want to redirect the first sliding image to http://google.com when I click on it. I use a html tag like this:

<div class="slideshow">
   <ul>
      <li><a href="http://google.com"><img src="lemons/1.jpg" alt="lemon" /></a></li>
      <li><img src="lemons/2.jpg" alt="lemon tea" /></li>
   </ul>
</div>

<a href="#" onclick="$('.slideshow').blinds_change(0)">1</a>
<a href="#" onclick="$('.slideshow').blinds_change(1)">2</a>

but it doesn’t work.
My question is how can I redirect the first sliding image to google.com when I click on it ?
Thanks in advance.

  • 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-01T12:45:01+00:00Added an answer on June 1, 2026 at 12:45 pm

    Here is something quick and dirty I cooked up modifying the original jquery-blinds.
    Put it in a new JS file and call it jquery.blinds-0.9-with-hyperlinks.js or something and include it in place of the current jquery-blinds code.

    It should work with the HTML you posted above. It simply checks if any of the images are wrapped in an ” tag and if it is, makes the image redirect to that link on click.

    /*!
     * jQuery Blinds
     * http://www.littlewebthings.com/projects/blinds
     *
     * Copyright 2010, Vassilis Dourdounis
     * 
     * Permission is hereby granted, free of charge, to any person obtaining a copy
     * of this software and associated documentation files (the "Software"), to deal
     * in the Software without restriction, including without limitation the rights
     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     * copies of the Software, and to permit persons to whom the Software is
     * furnished to do so, subject to the following conditions:
     * 
     * The above copyright notice and this permission notice shall be included in
     * all copies or substantial portions of the Software.
     * 
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     * THE SOFTWARE.
     *
     * Modified by Thomas Antony ( http://www.thomasantony.net ) on 06-Apr-2012
     * Added image hyperlinking functionality
     *
     */
    (function($){
    
        $.fn.blinds = function (options) {
    
            $(this).find('li').hide();
            $(this).addClass('blinds_slideshow');
    
            settings = {};
            settings.tile_orchestration = this.tile_orchestration;
    
            settings.h_res = 12;
            settings.v_res = 1;
    
            settings.width = $(this).find('li:first').width();
            settings.height = $(this).find('li:first').height();
    
            jQuery.extend(settings, options);
    
            tiles_width = settings.width / settings.h_res;
            tiles_height = settings.height / settings.v_res;
    
            // Get image list
            blinds_images = [];
            blinds_links = [];
    
            $(this).find('img').each(function (i, e) {
                blinds_images[blinds_images.length] = {'title': e.alt, 'src': e.src}
                // Code added to allow for linking functionality -- Thomas
                if( $(e).parent().is('a') && $(e).parent().attr('href') != undefined)
                {
                    blinds_links[i] = $(e).parent().attr('href');
                }else{
                    blinds_links[i] = "";
                }
            });
    
            // Create blinds_container
            $(this).append('<div class="blinds_container"></div>');
    
            blinds_container = $(this).find('.blinds_container');
            blinds_container.css({
                'position'  : 'relative', 
                'display'   : 'block', 
                'width'     : settings.width, 
                'height'    : settings.height, 
    //          'border'    : '1px solid red', // debuging
                'background': 'transparent url("' + blinds_images[1]['src'] + '") 0px 0px no-repeat'
            } );
    
    
            // Setup tiles
            for (i = 0; i < settings.h_res; i++)
            {
                for (j = 0; j < settings.v_res; j++)
                {
                    if (tile = $(this).find('.tile_' + i + '_' + j))
                    {
                        h = '<div class="outer_tile_' + i + '_' + j + '"><div class="tile_' + i + '_' + j + '"></div></div>';
                        blinds_container.append(h);
                        outer_tile = $(this).find('.outer_tile_' + i + '_' + j);
                        outer_tile.css({
                            'position'  : 'absolute',
                            'width'     : tiles_width,
                            'height'    : tiles_height,
                            'left'      : i * tiles_width,
                            'top'       : j * tiles_height
                        })
    
                        tile = $(this).find('.tile_' + i + '_' + j);
                        tile.css({
                            'position'  : 'absolute',
                            'width'     : tiles_width,
                            'height'    : tiles_height,
                            'left'      : 0,
                            'top'       : 0,
    //                      'border'    : '1px solid red', // debuging
                            'background': 'transparent url("' + blinds_images[0]['src'] + '") -' + (i * tiles_width) + 'px -' + (j * tiles_height) + 'px no-repeat' 
                        })
    
                        jQuery.data($(tile)[0], 'blinds_position', {'i': i, 'j': j});
                    }
                }
            }
    
            jQuery.data(this[0], 'blinds_config', {
                'h_res': settings.h_res,
                'v_res': settings.v_res,
                'tiles_width': tiles_width,
                'tiles_height': tiles_height,
                'images': blinds_images,
                'img_index': 0,
                'change_buffer': 0,
                'tile_orchestration': settings.tile_orchestration
            });
    
    
            // Add redirection code for the links -- Thomas 
            var container = this[0];    // Need this to get config data within click handler
            jQuery.data(this[0], 'blinds_links', blinds_links);
    
            blinds_container.click(function(){
                var config = jQuery.data(container, 'blinds_config');
                if(blinds_links[config.img_index] != "")
                {
                    window.location.href = blinds_links[config.img_index]
                }
            }); 
            $(this).update_cursor(); // Set correct cursor for first image -- Thomas
            // Modified code ends
    
        }
    
        $.fn.blinds_change = function (img_index) {
    
            // reset all sprites
            config = jQuery.data($(this)[0], 'blinds_config');
            for (i = 0; i < config.h_res; i++)
            {
                for (j = 0; j < config.v_res; j++) {
                    $(this).find('.tile_' + i + '_' + j).show().css('background', 'transparent ' + 'url("' + config.images[config.img_index]['src'] + '") -' + (i * config.tiles_width) + 'px -' + (j * config.tiles_height) + 'px no-repeat');
                }
            }
    
            $(this).children('.blinds_container').css('background', 'transparent url("' + blinds_images[img_index]['src'] + '") 0px 0px no-repeat' );
    
            config.img_index = img_index;
            jQuery.data($(this)[0], 'blinds_config', config);
    
            for (i = 0; i < config.h_res; i++)
            {
                for (j = 0; j < config.v_res; j++) {
                    t = config.tile_orchestration(i, j, config.h_res, config.v_res);
    
                    config = jQuery.data($(this)[0], 'blinds_config');
                    config.change_buffer = config.change_buffer + 1;
                    jQuery.data(this[0], 'blinds_config', config);
    
                    $(this).find('.tile_' + i + '_' + j).fadeOut(t, function() {
                        blinds_pos = jQuery.data($(this)[0], 'blinds_position');
                        config = jQuery.data($(this).parents('.blinds_slideshow')[0], 'blinds_config');
    
                        $(this).css('background', 'transparent ' + 'url("' + config.images[config.img_index]['src'] + '") -' + (blinds_pos.i * config.tiles_width) + 'px -' + (blinds_pos.j * config.tiles_height) + 'px no-repeat');
    
                        config.change_buffer = config.change_buffer - 1;
                        jQuery.data($(this).parents('.blinds_slideshow')[0], 'blinds_config', config);
    
                        if (config.change_buffer == 0) {
    //                      $(this).parent().parent().children().children().css('width', config.tiles_width);
                            $(this).parent().parent().children().children().show();
                        }
    
                    });
                }
            }
            $(this).update_cursor();
        }
    
        $.fn.tile_orchestration = function (i, j, total_x, total_y) {
            return (Math.abs(i-total_x/2)+Math.abs(j-total_y/2))*100;
        }
    
        // Function to update cursor to a "hand" if image is linked -- Thomas
        $.fn.update_cursor = function()
        {
            // Change cursor if image is hyperlinked
            var config = jQuery.data($(this)[0], 'blinds_config');
            var blinds_links = jQuery.data($(this)[0], 'blinds_links'); // get links from saved data
    
            console.log(config.img_index);
            if(blinds_links[config.img_index] != "")
            {
                $(this).find('.blinds_container').css('cursor','pointer');
            }else{
                $(this).find('.blinds_container').css('cursor','auto');
            }
        }
    
    })(jQuery);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
I am reading a book about Javascript and jQuery and using one of the
We're building an app, our first using Rails 3, and we're having to build
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.