Results 1 to 2 of 2

Thread: Sliding stops when clicking on Image link inside the content slider

  1. #1
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sliding stops when clicking on Image link inside the content slider

    1) Script Title: Featured Content Glider

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tentglider.htm

    3) Describe problem:
    I have 2 div's which I want to rotate, inside this divs I have a tags which are linked to images. Something like this.

    Code:
    <div id="slider2">
                <div id="Badge3a" class="contentdiv badge">
                    <a href="http://www.google.com" target="_blank">
                        <img src="images/img1.png" />
                    </a>
                </div>
                <div id="Badge3b" class="contentdiv badge">
                    <a href="http://www.yahoo.com/" target="_blank">
                        <img src="images/img2.png" />
                    </a>
                </div>
            </div>
    
    <div id="paginate-slider2" class="pagination">
        </div>
        <script type="text/javascript">
    
            featuredcontentslider.init({
                id: "slider2", //id of main slider DIV
                contentsource: ["inline", ""], // Valid values: ["inline", ""] or ["ajax", "path_to_file"]
                toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
                nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
                enablefade: [true, 0.3], //[true/false, fadedegree]
                autorotate: [true, 3000], //[true/false, pausetime]
                onChange: function (previndex, curindex) { //event handler fired whenever script changes slide
                    //previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
                    //curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
                }
            })
        </script>
    Everything works fine, except when I click on the any 1 Image link in this slider, the sliding stops and doesnt resume.....
    Is it something I am missing.
    Last edited by ddadmin; 08-17-2011 at 03:33 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Do you mean the Featured Content Glider, or the Featured Content Slider?

    Your post says Glider and links to the Glider script, but your code uses the function for the Slider, and the title of your post says Slider.

    I'm going to assume you mean Slider for now.

    Your question is still confusing because I can't tell if you mean the pagination links or content in the slider itself. Either way, that's the how the script is written. If you click on the pagination links or the content, it switches to manual mode.

    If I'm right about which script you're using, and if you're talking about the clicks inside the content divisions, add this (highlighted) after your init:

    Code:
        <script type="text/javascript">
    
            featuredcontentslider.init({
                id: "slider2", //id of main slider DIV
                contentsource: ["inline", ""], // Valid values: ["inline", ""] or ["ajax", "path_to_file"]
                toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
                nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
                enablefade: [true, 0.3], //[true/false, fadedegree]
                autorotate: [true, 3000], //[true/false, pausetime]
                onChange: function (previndex, curindex) { //event handler fired whenever script changes slide
                    //previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
                    //curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
                }
            })
            ;document.getElementById('slider2').onclick = function(){};
        </script>
    If you're talking about something else, please be more specific. And if you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •