Comments (6)
you might be able to do this:
<a href="#1" data-liquidslider-ref="slider-1 slider-2">moves both sliders</a>
from liquidslider.
Thank you for the quick response, but that doesn't seem to do the trick. I wonder about a single jquery function that controls more than one slider? How do I refer to a slider in such a function?
from liquidslider.
You could do that as well, but this should work. It works for me just fine. Do you have crossLinks set to true on both sliders?
from liquidslider.
Yes. When I tried this link, it didn't change either slider, although both:
<a href="#1" data-liquidslider-ref="slider-1">Slider 1</a>
and
<a href="#1" data-liquidslider-ref="slider-2">Slider 2</a>
worked.
I have to admit I am an oldschool js guy who is just gettting into jquery. If I wanted to change to link in js I could create a function something like this:
function 2sliders() {
document.getElementById("slider1").href = "http://example.com/#1";
document.getElementById("slider2").href = "http://example.com/#1";
}
What would the jquery eqivalent be?
from liquidslider.
not sure why it doesnt work. It seems to work fine in my demo that's included with the slider. Did you try it there?
You can try to use this inside your function instead:
function 2sliders() {
var sliderObject1 = $.data( $('#slider-1')[0], 'liquidSlider');
var sliderObject2 = $.data( $('#slider-2')[0], 'liquidSlider');
sliderObject1.setCurrent(1);
sliderObject2.setCurrent(1);
}
from liquidslider.
This worked great, thanks!
from liquidslider.
Related Issues (20)
- Hidden Panel?
- Not autoSliding
- issue on Windows Google Chrome HOT 3
- Tab Link problem in iphone
- continuous:false is not working simply HOT 2
- 100% width slider - Weird margin on left side (Chrome) HOT 3
- Font became bigger on iphone 5 and 5s HOT 1
- Prevent double-click from advancing slider twice. HOT 2
- How to set width to 100% HOT 5
- slider not working with apache web server HOT 2
- Slide tabs from top to bottom HOT 1
- How to link to slides from extern per #id HOT 3
- Slides not growing 100% when i am resizing HOT 1
- RLT Support HOT 7
- Need help trying to load 2 slides from 1 anchor HOT 2
- Change Content / Destroy / Reinitialize HOT 1
- Tab action for external link HOT 11
- Apple Animation Issue HOT 12
- Accessibility Advice? HOT 1
- keyboardNavigation: true is breaking tabbing of global navigation if more than one level deep in Dropdown Menu HOT 1
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 liquidslider.