Comments (9)
Yeah that's a good call. Just added that to the latest version.
This is how to use it:
animationComplete: function(current){
// Current returns current slide number
console.log(current);
}
Check out "/examples/Images with titles/" in the download for an example.
from slidesjs.
Awesome. Just to let you know I'm using: http://www.asual.com/jquery/address/ to deep-link my "slides". So on animationComplete I'm updating the virtual address.
var pages = ['/welcome', '/products', '/services', '/about']; $.address.externalChange(function(event) { var goTo = event.value; if (goTo == '/') { goTo = pages[0]; } $('.pagination a[rel="' + pages.indexOf(event.value) + '"]').click(); });
animationComplete: function(current){ $.address.value(pages[current - 1]); }
I think we're going to need access to the goToSlide(num) method eventually. Simulating a click is not great because we'll not always have pagination turned on. I can open a new ticket for you if you'd like.
Another idea would be to have deep-linking built in? Give each slide an id that will be the virtual address? If not built in have it easily implemented with that jQuery Address plugin.
Great plugin man. I appreciate it!
from slidesjs.
Yeah I'll have to look into adding deep linking. Love what you're doing though. I would like to find an easier way to link to a specific slide like from a hash. I'll have to mess around with that. Thanks for sharing this.
from slidesjs.
I just added slide-to-slide linking and deeplink. Download the latest and check out "Linking" within the examples folder. Let me know if that works out for you.
from slidesjs.
I like where you went with it. Didn't really build it in to the plugin but left it up to the end user on how they'd like to implement it. Very cool. I think this is important especially in my case where I have the array of page names so I have pretty deep links. I didn't have to change any of my implementation code except for the rel -> href.
from slidesjs.
I guess one thing I'd like to have but not crucial is to have the ability to give each slide an id and have that used as the href="#about" or href="#welcome" instead of href="#0" and href="#1" on the pagination links. Something like that.
from slidesjs.
Hello.
I'd like to start a text box sliding within the current slide, before the slide animation begins. An example of something similar to what I'm describing is here: http://www.ibm.com/us/en/sandbox/ver2/.
It seems that the best place to do this would be in animationStart. If that's the right approach, then It would be real nice to also have the current var passed in to animationStart, too.
from slidesjs.
Good call Michael. I just added that to version 1.1.4 that'll be up a in a few. Thanks for the suggestion.
from slidesjs.
Hi I'd like some help performing an action on a particular slide when it comes up... show a badge or something, but I'm getting an uncaught exception error. for example i have:
animationComplete: function(current){
if(current==1) {
$('#promo').addClass('ding');
} else {
$('#promo').removeClass('ding');
}
},
I get the error in FF: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource://gre/components/nsPrompter.js :: openTabPrompt :: line 468" data: no]
from slidesjs.
Related Issues (20)
- [enhancement] Add missing bower.json.
- The website should mention the navigation api HOT 3
- Update() callback
- The controls for version 3 are not touch draggable.
- Slide disappears/height problem with bootstrap/hide (possible fix included)
- Make API access available in callback loaded HOT 1
- "Plugin.prototype.goto" A reserved word
- image disappears on window resize HOT 3
- Slide width error on resize
- ie 6 children() selector
- pauseOnHover disabled after pagination is clicked.
- SidesJS slide on hover HOT 1
- Dissolve fade effect
- Fading in
- Don't use ECMA-262 reserved word
- Dead? HOT 2
- Update examples on website to show that full html and not just image tags can be used as slides.
- add title for each images
- Oversized White space under images
- Unable to disable looping
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 slidesjs.