- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › image slider
Here is my code.I’m designing a website,where in the index page there should be image slider
there will be a registration form on the image slider,I want that the slider images will slide but the form will not slide,it will be in it’s same position.
But I can’t do that and I have no idea that how should I do that.
Please help me out.Thanks in advance.
Please upload your code to CodePen
Do you have a live URL? Otherwise, where is your CSS and slider? Can you upload your images to something like Tinypic.com and replace the url in <img src="place URL here" />
It is helpful when we see that you have put some effort into your issue. All I see here is just HTML.
function swapImages(){
var $active = $('#myGallery .active');
var $next = ($('#myGallery .active').next().length > 0) ? $('#myGallery .active').next() : $('#myGallery img:first');
$('.active').fadeOut(function(){
$('.active').removeClass('active');
$next.fadeIn().addClass('active');
});
}
$('document').ready(function(){
// Run our swapImages() function every 5secs
setInterval('swapImages()', 5000);
});
#myGallery{
position:relative;
width:400px;
height:300px;
}
#myGallery img.active{
display:block;
}
#form {
width:200px;
height:200px;
background:yellow;
position:absolute;
bottom: 20px;
right: 20px}
i want fade in and out very slow pls help me out
Please apply that code to the codepen, click save. Again, please upload your images to Tinypic and replace the URLS.