Jump to content

i cant for the life of me work out why if you use the next button it wont loop round and go back to the first picture, but the previuos button works fine!

<div class="container">			<div class="carousel slide" data-ride="carousel" id="carousel-ex">				<ol class="carousel-indicators">					<li data-target="#carousel-ex" data-slide-to="0" class="active"></li>					<li data-target="#carousel-ex" data-slide-to="1"></li>					<li data-target="#carousel-ex" data-slide-to="2"></li>				</ol>				<div class="carousel-inner">					<div class="item active">						<img src="desktop.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>					<div class="item">						<img src="dropbox.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>					<div class="item">						<img src="temp.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>					<a href="#carousel-ex" class="left carousel-control" data-slide="prev">						<span class="glyphicon glyphicon-chevron-left"></span>					</a>					<a href="#carousel-ex" class="right carousel-control" data-slide="next">						<span class="glyphicon glyphicon-chevron-right"></span>					</a>				</div>			</div>		</div>

Check out my current projects: Selling site (Click Here)

If($reply == "for me to see"){

   $action = "Quote me!";

}else{

   $action = "Leave me alone!";

}

Link to comment
https://linustechtips.com/topic/435861-bootstrap-help/
Share on other sites

Link to post
Share on other sites

Move carousel controls <a> tags upper of DOM tree, so they wont be inside div.carousel-inner and it will work as expected.

 

I mean something like this:

                                <div class="carousel-inner">					<div class="item active">						<img src="desktop.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>					<div class="item">						<img src="dropbox.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>					<div class="item">						<img src="temp.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>				</div>				<a href="#carousel-ex" class="left carousel-control" data-slide="prev">					<span class="glyphicon glyphicon-chevron-left"></span>				</a>				<a href="#carousel-ex" class="right carousel-control" data-slide="next">					<span class="glyphicon glyphicon-chevron-right"></span>				</a>
Link to comment
https://linustechtips.com/topic/435861-bootstrap-help/#findComment-5849337
Share on other sites

Link to post
Share on other sites

 

Move carousel controls <a> tags upper of DOM tree, so they wont be inside div.carousel-inner and it will work as expected.

 

I mean something like this:

                                <div class="carousel-inner">					<div class="item active">						<img src="desktop.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>					<div class="item">						<img src="dropbox.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>					<div class="item">						<img src="temp.png" alt="image">						<div class="carousel-caption">							<h2>This is the heading</h2>							<p>This is the paragraph</p>						</div>					</div>				</div>				<a href="#carousel-ex" class="left carousel-control" data-slide="prev">					<span class="glyphicon glyphicon-chevron-left"></span>				</a>				<a href="#carousel-ex" class="right carousel-control" data-slide="next">					<span class="glyphicon glyphicon-chevron-right"></span>				</a>

ohhh... i see! thank you very much!  i was so stuck on it :D 

Check out my current projects: Selling site (Click Here)

If($reply == "for me to see"){

   $action = "Quote me!";

}else{

   $action = "Leave me alone!";

}

Link to comment
https://linustechtips.com/topic/435861-bootstrap-help/#findComment-5851950
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×