Comments (5)
For reference's sake; I'm using the latest build of jQuery: 1.7.2
from responsiveslides.js.
Can you tell me what you are trying to achieve/do to the "current slide"? would be easier to help : )
from responsiveslides.js.
I have other elements on the page that I want to change/move/scale together with the change of the slides.
In order to synchronize them, I want to run my code in the before
/after
callback. I have to know which slide is currently being shown in order to know which elements to move where etc.
from responsiveslides.js.
It's a bit hard right now, but here's a short example how it would be possible (this will be easier once I get the 2.0 plugin out, but that might take a while):
$(".rslides3").responsiveSlides({
auto: false,
nav: true,
before: function () {
var currentSlide = $("." + this.namespace + "1_on").attr("id");
console.log("Started animating from '#" + currentSlide + "' to the next");
},
after: function () {
var currentSlide = $("." + this.namespace + "1_on").attr("id");
console.log("Stopped animating and you are seeing '#" + currentSlide + "'");
}
});
And if you want to execute something, for example, when the first and the second slide start animating:
before: function () {
// If we are seeing the 1st slide
if ($("#" + this.namespace + "1_s0").hasClass(this.namespace + "1_on")) {
console.log("First slide started animating");
// Now do something here...
}
// If we are seeing the 2nd slide
if ($("#" + this.namespace + "1_s1").hasClass(this.namespace + "1_on")) {
console.log("Second slide started animating");
// Do something else here...
}
}
Hope that helps… :)
from responsiveslides.js.
Would be nice if it works without "1_on".
I've got 2 or more Slideshows on one page.
And I have a page like "page 1 of 4" - in each slideshow.
How would I do that?
Indeed, this works for ONE slideshow but not for many:
after: function(){
var currentSlide = $("." + this.namespace + "1_on").attr("id");
$(".slideshow-container .slide-count .one").html($(".slideshow-container-body").find("li#" + currentSlide).index() + 1);
}
from responsiveslides.js.
Related Issues (20)
- Firefox First Slider Problem
- Missing css for navigation
- Is there documentation explaining how to achieve the different Nav types?
- Readme out of date?
- responsiveSlides is not work my website HOT 1
- stop "auto: true" when clicking on "pager" or "nav"
- How to get current slider index HOT 1
- $slide.stop(true, true) is not a function HOT 2
- HTTPS breaks it? HOT 2
- Uncaught ReferenceError: responsiveSlides is not defined HOT 1
- Uncaught TypeError: e.size is not a function HOT 2
- Slides disappears when slider switch.
- silder not working
- Edge Issue
- getting an error
- How to import in node js
- Change Animation to fade from slide
- slide http vs https
- WCAG / ADA Compliance Issue from Malformed <UL> HTML
- Active fork ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from responsiveslides.js.