erik-krogh / SudoSlider

The most versatile jQuery content slider
36 stars 24 forks source link

History of first slider #31

Closed robinknaapen closed 9 years ago

robinknaapen commented 9 years ago

okay another issue, have nested sliders. history is enabled press return nothing returns it stays on the page i clicked. $("#consultancy-slider").sudoSlider({ ajax: [ 'pages/pages/consultancy-main.php', 'pages/pages/consultancy-fttx.php', 'pages/netwerkOntwerp.php', 'pages/datacenter.php', 'pages/voip.php', 'pages/pages/consultancy-ssl.php', 'pages/pages/consultancy-streaming.php', 'pages/pages/consultancy-opensource.php' ], effect:"slide", history:true, customLink:'.consultancy-link', prevNext: false, interruptible:true, speed:500, responsive:true, numericText:['Consultancy', 'fttx', 'Netwerkontwerp', 'Datacenter', 'Voip', 'SSL', 'Streaming', 'OpenSource'], beforeAnimation: function(slide){ $("#mCSB_1_container").animate({top:0}, 500); return false; }, });

lets say i start at consultancy-main.php click on the link for consultancy-fttx.php press return in browser it stays on fttx

webbiesdk commented 9 years ago

Cannot reproduce https://jsfiddle.net/2ee5rqpf/1/

Do you by any chance use href="#" in your "links". Because that breaks everything.

robinknaapen commented 9 years ago

okay i think i've not given enough info.

<div id="slider">
</div>
$("#slider").sudoSlider({ 
    ajax: [
       'pages/home.php', 
       'pages/beheer.php', 
       'pages/consultancy.php',  // in this page i've got another slider and the Js nothing els
       'pages/datacenter.php', 
       'pages/netwerkOntwerp.php',
       'pages/voip.php'
    ],
    effect:"slide",
    history:true,
    customLink:'.link',
    prevNext: false,
    interruptible:true,
    speed:500,
    responsive:true,
    numericText:['home', 'beheer', 'consultancy', 'datacenter', 'netwerkontwerp', 'voip'],
    beforeAnimation: function(slide){
        $("#mCSB_1_container").animate({top:0}, 500);
        return false;
    },
});


Lets say i'm on my "consultancy" page i want to nest another slider.

<!-- consultancy.php -->
<div id="consultancy-slider">
</div>
$("#consultancy-slider").sudoSlider({ 
    ajax: [
       'pages/pages/consultancy-main.php', // this page contains the "customLink"
       'pages/pages/consultancy-fttx.php', 
       'pages/netwerkOntwerp.php', 
       'pages/datacenter.php',
       'pages/voip.php',
       'pages/pages/consultancy-ssl.php',
       'pages/pages/consultancy-streaming.php',
       'pages/pages/consultancy-opensource.php'
    ],
    effect:"slide",
    history:true,
    customLink:'.consultancy-link',
    prevNext: false,
    interruptible:true,
    speed:500,
    responsive:true,
    numericText:['Consultancy', 'fttx', 'Netwerkontwerp', 'Datacenter', 'Voip', 'SSL', 'Streaming', 'OpenSource'],
    beforeAnimation: function(slide){
        $("#mCSB_1_container").animate({top:0}, 500);
        return false;
    },
});


i browse to http://www.example.com/#consultancy
click my link to "consultancy-fttx.php"

browser tells me http://www.example.com/#fttx

when i press return in my browser the url changes to http://www.example.com/#consultancy

but the page remains on fttx

webbiesdk commented 9 years ago

I'm sorry, i still cant replicate.

Could you send a link to the page with the problem, or send a zip with a static copy?

robinknaapen commented 9 years ago

http://test.mediacaster.nl click
from there u can click the little ' i ' icons for more info (page content is blank).
Try to go back and the ' i ' info page will still be there even though you've pressed "back" in the browser

webbiesdk commented 9 years ago

In your main slider, the hash for the page is "consultancy", while you in the nested slider is "Consultancy". Notice the uppercase C in the later. If you make them the same, i think it will work like you expect.

robinknaapen commented 9 years ago

nice it indeed works as expected.

Thanks