-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insertSlide/removeSlide functions? #41
Comments
It is not possible right now. I will think about it! |
This would be absolutely great if something like this could happen - I've been trying to get something going but of course the translate 3d jumps to the next slide if you remove one above it. Not sure if you remember my site - I was using one of your earliest versions and you answered on stackoverflow - anyway I've finally had time to go back to it, implemented the newest version and absolutely loving it. Either a way to remove the initial div (my splash page) or stop a user scrolling to a certain section, either would work. If you want to have a look at what I mean - bnacademy.com.au Keep up the amazing work 👍 |
XsitX Your totally right, i also need something like that, i want to keep people in the first page until page load finish, |
In order to do so you don't need to use AJAX or dynamically add new sections/slides. |
but for my website, karmaffne.com there is have maybe 450 small pictures and those pictures call with other jquery script i can't use afterLoad trick i guess.. 🎱 |
Ive handled the keeping people on the splash page by disabling scroll and arrow navigation until they click the 'begin' button, which only appears after everything has loaded. |
Ok i found a solution that works fine for me. I named the sections id "section_
onSlideLeave: function(anchorLink, index, slideIndex, direction){
var next_slide_index;
if(direction == 'right'){
next_slide_index = slideIndex + 1;
} else {
next_slide_index = slideIndex - 1;
}
var next_slide = $('#section_'+anchorLink).find('.slide').eq(next_slide_index);
if(next_slide.length && next_slide.data('url') && !next_slide.data('loaded')) {
next_slide.find('.tableCell').load(next_slide.data('url'), function() {
next_slide.removeClass('loading').data('loaded',true);
});
}
},
afterSlideLoad: function( anchorLink, index, slideAnchor, slideIndex){
var slide = $('#section_'+anchorLink).find('.slide').eq(slideIndex);
if(slide.length && slide.data('url') && !slide.data('loaded')) {
slide.find('.tableCell').load(slide.data('url'), function() {
slide.removeClass('loading').data('loaded',true);
});
}
},
afterRender: function() {
$('[data-url]').addClass('loading');
} I know it's not really a dynamic adding of slides but it helps you to keep the traffic low by loading the slices when they are needed. |
@painis just be careful with loading data into the section dynamically. You will probably have problems if you are using the option If you are just avoiding the load of background images, I would recommend dealing with CSS to solve the problem. |
The feature of adding or deleting sections won't be done. A future function to avoid scrolling right or left, up or down, might be created so you will be able to have empty sections / slides which would be able to be filled with content whenever you want. This way, although the addition or deletion of sections or slides won't be implemented, the same behavior for the final user could be accomplish. |
Is it possible to easily added functions to allow slides to be inserted and removed at an index? It would be really great to add/remove content dynamically.
The text was updated successfully, but these errors were encountered: