How can I create this carousel in Bootstrap 3? I want to slide at one time one div, not three. I tried exchange the normal carousel images with divs, but it's not working correctly.
I want somenthing like this:
http://i.stack.imgur.com/DwVKw.gif
What you need is set overflow-x: scroll for your grid and set fixed width for it.
And then via butoons scrool to next item (use $(".wheelGrid").animate({scrollLeft: leftPos}, height);)
Related
I want to make a slider with a scrollable right-justified image and text like in the image, how can I do this? https://prnt.sc/26mtj6v
I am sending a sample site and picture, you can check it. The image I sent has a scrollable image and a box section for text. Half of the 2nd image will be visible and when you slide to the left in the slider logic, 2 images will come to the front and the text inside the box will change.
https://prnt.sc/26mtuw6
Although not exactly the same, our latest project section on this site is an example
http://paul-themes.com/html/liarch/home-default.html
If you wish to make a design like the img below :
For the images of my code below, I'm using Bootstrap 5.1.3 (the class names are mostly from the framework)
1) you will need to use some display: flex on a container in order to have elements in a row and next to each other (create it in your CSS to use that, if you're not using the Bootstrap Framework). Also, add a width:100% on that container in order for it to take the whole space (it's the w-100 class from Bootstrap, or else, add it in your personnal CSS - here 100% is 100% of body)
2) you will need to make that container scrollable with a overflow-x:scroll
3) you will need to create a block (div) for your title and paragraph that needs to be in position: absolute and give it top/bottom/right/left coordinates
5) you will need your container to be in position: relative, so the title/paragraph (step 3) is placed depending on the container
6) you will need to give your imgs a width sufficiently big enough for the scroll to actually start working (you need the elements inside your container to be larger than the container's total width so it becomes scrollable)
This is a quick example I made :
Here is the code of my example
HTML :
CSS :
I am using cubeportfolio to get masonry filterable portfolio. Worked like a charm, but then I wanted to add a toggle inside the cbp-item.
This is the result (watch it on mobile): http://www.lichaamengeest.be/AA.php
You can see that, when toggling the content in the first cbp-item, the content comes up behind the cbp-item below, instead of the toggle content pushing the next cbp-item downwards. The height is not set fixed, so it should move freely.
The coder of cubeportfolio told me to add this code
jQuery('.cbp').cubeportfolio('layout'); But my unanswered question is: where and how to add that code? Here's the js file with toggle code: http://www.lichaamengeest.be/scripts/custom.js
I think your problem is the „position: absolute” on the „.cbp-item”. If you wrote the toggle function on your own try to get the height of the box and add this as new position for the following box, when you click on to toggle. So that it's recalculated it after every click.
How do I change content of image elements similarly to changing content in p (HTML paragraph) elements? (refer to: http://www.w3schools.com/jquery/html_html.asp)
I would like to have a scatter+sort effect button next to a default carousel view of images that when clicked, will, as you might have already guessed, scatter and sort itself in a stationery template.
Also, having the button change when clicked to flip between "Scatter+Sort" and "Carousel" views.
Here is what I have so far:
Carousel view - https://gyazo.com/18e67f7347de3310d155c0b8624b3716
Stationary view - https://imgur.com/a/coreG
What I intend on doing is following a similar approach to Jennifer Dewalt's a project a day for 180 days, except I am doing 100 projects in an indefinite time period.
Update: I got a button to bring up an image, but the container of images (carousel) is still on the page and does not vanish upon button click. Also, the image is shown as not available on the top left of screen before button click.
Update 2: Something I am looking into: https://www.w3schools.com/css/css3_animations.asp . Animation iteration count of 1. I'm thinking maybe, if it's possible, to rewrite the container class (carousel) in css then pulling the code in an html file, so that way I can manipulate the elements within the container.
document.getElementById("myImg").setAttribute("src", "my-new-image-source.jpg");
http://www.w3schools.com/jsref/met_element_setattribute.asp
I am using jQuery Cycle 2's auto-height feature (data-cycle-auto-height=container). This is great and it resizes the cycle wrapper to the height of each slide. However, I have a show/hide element inside one of my slides and the Cycle's height does not adapt when toggling this content.
Can I trigger the auto-height functionality on my show/hide href?
I think it might work if you called the cycle-update-view function when ever your show / hide element is triggered.
elShowFunc(){
// Your Code Here
$('.YourCycle2Selector').cycle-update-view();
}
I've developed one page using jCarousel within jQuery ui Tabs.
Following page is what I got:
http://knowledge.teldap.tw/knowledgeFB/my_creation/?fid=668330535
Problem is:
If you click the 3rd tab (only one item), you'll find nothing unless you click the left arrow to navigate. It's weird because one the 1st tab ( more than one items) everything is normal and visible.
Can anyone find out what I've missed? Because I've struggled on this for several hours.
Thanks!
The problem is the width of your carousel image has not been adjusted properly
In your jquery,put scroll 1
jQuery('#listelements').jcarousel({
scroll : 1,
And also adjust the height of the container
.jcarousel-skin-tango1 .jcarousel-container-horizontal {
width: 1200px;
height:630px;
margin-left://adjust margin left here
}
You may have a look on this carousel example