hiii everyone,
i want to make a slider for exercise1 and exercise2 in same html page if i select next then it will appear next exrcise after complete exercise as same as image slider it will not show two exrsice at same time only one will be display at a time and should wiork as slider for next exrecise please help me to develope this
my jsfiddle is :jsfiddle.net/hirenwebdp/Ky8fP/7/
In my jsfiddle you can see that there is two exercise in one html page but it no have slider both are appearing on same so i want to develope slider for exercises 1 and 2
please help me
You can use bxslider for this purpose. It's not just an image slider but also a content slider as well.
Here check the fiddle
Note that I have not implemented any validation. Like go to next slide only on completion of the first exercise etc. Hope you can achieve it on your own.
Include the bxslider js and css file and the plugin like this for eg.
$('.slider').bxSlider({
mode: 'horizontal',
auto: false
});
If you don't want infiniteLoop, you can set it to false too.
$('.slider').bxSlider({
mode: 'horizontal',
auto: false,
infiniteLoop:false
});
Related
I have variable number of cards and also the container is of dynamic dimensions.
So I set variableWidth: true and as per requirement infinite: false
What I have is below issue where I have to solve.
I want the first and last slide to stick to edges.
I am using Jquery Slick Carousel
JS Fiddle to quickly check the issue
https://jsfiddle.net/34mjkz38/
Check the code at this merge request, it worked for me.
https://github.com/kenwheeler/slick/pull/2635
He adds a new option called "outerEdgeLimit".
I'm trying to find a way to slide my data within a container without having to use the default horizotal scrollbar.
So I tried using swiper.js. It works - kind of, but the problem is that I can't freely slide it back and forth without the "slide" automatically sliding back.
I made a fiddle here to test.
Here is the JS code I'm using:
var swiper = new Swiper('.swiper-container', {
freeMode: true,
freeModeSticky: false,
grabCursor: true
});
Is it possible using swipe.js to freely moving the content back and fort?
If no, is there a better way to do this?
It's because you only have one slide with the table. I edited your fiddle to add a <div class="swiper-slide"></div> before the table slide and it stopped resetting back to the start.
I have a simple Jquery UI accordion with 3 sections. All 3 sections are collapsed in the beginning. When I click on a section header, the section content should show (slide) up. The special thing is now that the section content divs are positioned absolutely over each other.
To make it look good I want that the current opened section toggles completely before the animation of showing the next section begins.
This is what I have made to toggle the section it right now:
$(function () {
$("#accordion").accordion({
create: function (event, ui) {
ui.oldPanel.slideToggle("slow");
},
collapsible: true,
active:false
});
});
You can see how it looks like on:
http://jsfiddle.net/kqMAR/
It appears that the toggle and show up animation start at the same time. But what I want is to toggle it completely before starting the next slide up.
New Answer :
Try this
http://jsfiddle.net/6QJJp/1/
This is what you exactly need
you will need to fix CSS according to you requirement.
$(function () {
$("#accordion").accordion({
animate:{duration:5000},
collapsible: true,
active:false
});
});
Use above function to understand what is happening actually, new section starts opening as soon as the old section starts closing that's why its giving an illusion of incomplete animation. for complete animation place the buttons one below another then you will be able to see proper animation. If you require horizontal arrangement then you can possibly use fading effect that also looks cool.
I have elements like this
<div id="screen">
<div class="post">Post1......etc</div>
<div class="post">Post2......etc</div>
<div class="post">Post3......etc</div>
<div class="post">Post4......etc</div>
<div class="post">Post5......etc</div>
<div class="post">Post6......etc</div>
<div class="post">Post7......etc</div>
<div class="post">Post8......etc</div>
<div class="post">Post9......etc</div>
<div class="post">Post10.....etc</div>
</div>
But in screen box, size is limited to show only 5 elements. So at first Post1 to Post5 will be displayed. Rest is overflow hidden. At a interval of 2 seconds next element should show by scrolling up. That is after 2 seconds this contents of screen will scroll up 1 item. Now it will show Post2 to Post6. And this continues every 2 seconds like a loop. After Post10, Post1 should show up then Post2 and so.
I donot know how to do this. I read documentation of jQuery cycle: http://jquery.malsup.com/cycle/
But i didnot how to do this. This effect is like a news scroller.
Please help
Cycle is the wrong plugin to use for this as it only display one image at the time, it doesn't do sliding effects which is what you seem to want. Try jCarousel it's quite popular and easy to use (many examples and good doc)
http://sorgalla.com/projects/jcarousel/
In general rules if there isn't a demo close to what you want to achieve there is big chance that the plugin won't work as expected.
jCarousel is a nifty plugin for displaying tickers! But you'll need a bit of skinning to get it displayed as per your requirements.
To use jCarousel to get your scroller running, you'll have to make a little modification on your current HTML structure.
I have replaced the DIV type structure with an unordered list.
<ul id="mycarousel" class="jcarousel jcarousel-skin-tango">
<li>Post1......etc</li>
<li>Post2......etc</li>
<li>Post3......etc</li>
<li>Post4......etc</li>
<li>Post5......etc</li>
<li>Post6......etc</li>
<li>Post7......etc</li>
<li>Post8......etc</li>
<li>Post9......etc</li>
</ul>
To run this plugin at its very basic, you'll need to add the jCarousel script and a CSS theme to your page (I've used jCarousel's Tango theme).
Here's how you use the plugin:
$(document).ready(function(){
$('#mycarousel').jcarousel({
vertical: true, //Display a vertical carousel
auto: 2, //Scroll up automatically after every 2 seconds
scroll: 1, //No. of items to scroll up
visible: 5, //No. of visible items
wrap: 'last' //Go back to the 1st items after you've scrolled down to the last item
});
});
You will need to modify the CSS for the plugin to display it as per your need though.
Here's a fiddle I created using jCarousel: http://jsfiddle.net/kayen/VFdL8/
I am building a website with nivo slider image gallery. Its a briliant slider, but i need a slider counter like 1/6 (slide 1 of 6). I searched in the support page and google but all what i have found was the same question unanswered...
Use one of the nivo callback options.
$('#slider').nivoSlider({
afterChange: function(){
$('#counter').text( $('.controlNav .active').text() );
}
});
After each slide change it will take the text contents of the active nav control and use it to populate your counter. If you would like to provide a more specific context I could offer an explicit solution.