I have one page with slider with images and names of category, and second page with gallery and on this page is another slider with category icons. When you click on slider1 it shoud redirect you to page2 (gallery) and set slider2 to right positions, I mean slider2 shoud jump to proper slide with exactly the same category to show right pictures in gallery. Redirecting was no problem to me but I don't know how I should write the functions after redirecting to page. Right now I have
var slide_jump;
$('div.zobacz').bind("click touchstart", function() {
slide_jump = glide2.current(); //get number of slide on slider1 to know to which slide should jump slider2
setTimeout(function() {//redirecting must be after I get current slide on slider1
var url = "http:***.html";
$(location).attr('href', url);
}, 100);
//HERE IS MY PROBLEM
});
there is a function : slider2.jump(slide_jump)
- slider2 jump to proper slide, but I dont know were I shoud use it. it should be after the page2 load, i know there is something like
$(window).load(); $(document).ready();
but should I use it know? if everything is already in something like this.