SO Я построил это, с очень простым javascript, чтобы позволить пользователю циклически перебирать каждую функцию, щелкая по кнопке. Мне интересно, есть ли возможность позволить ему автоматически циклически переключаться между каждой кнопкой, сохраняя при этом ее интерактивность.Как я могу сделать это автоматически?
<img id="myImage" src="http://teetertv.com/wp-content/uploads/2016/12/app-features-calendar.png">
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-calendar.png'"><i class="fa fa-line-chart" aria-hidden="true"></i></button> <p class="features-text-app">Track use of the Teeter Inversion Table, including session length, frequency, and angle. </p> </div>
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-trends.png'"><i class="fa fa-area-chart" aria-hidden="true"></i></button> <p class="features-text-app"> Track your pain levels (pre and post inversion) and triggers. </p></div>
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-notifications.png'"><i class="fa fa-calendar" aria-hidden="true"></i></button> <p class="features-text-app"> Set reminders/push notifications to use the Teeter.</p></div>
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-countdown.png'"><i class="fa fa-volume-up" aria-hidden="true"></i></button> <p class="features-text-app"> Turn on optional voice prompts from Roger Teeter, offering guidance and tips to ensure the best experience. </p></div>
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-music.png'"><i class="fa fa-music" aria-hidden="true"></i></button> <p class="features-text-app">Select from a playlist of relaxing tunes while inverting. </p></div>
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-discover.png'"><i class="fa fa-newspaper-o" aria-hidden="true"></i></button> <p class="features-text-app">Explore the Discover feed, offering helpful product use tips and healthy lifestyle advice. </p></div>
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-support.png'"><i class="fa fa-info" aria-hidden="true"></i></button> <p class="features-text-app">Gain easy access to product support, videos, and contact information. </p></div>
<div style="display:table;"><button class="features-button-app" onclick="document.getElementById('myImage').src='http://teetertv.com/wp-content/uploads/2016/12/app-features-stories.png'"><i class="fa fa-comments" aria-hidden="true"></i></button> <p class="features-text-app"> Offer feedback, submit your own success story and join the Teeter community. </p></div>
.features-button-app {
height: 66px;
border-color: #ffffff;
border-width: 1px;
background-color: #a8c446;
height: 64px;
width: 64px;
line-height: 64px;
border-radius: 50%;
border-width: 0;
position: relative;
top: 1px;
left: 1px;
margin: 0;
border-radius: 50%;
color: #ffffff;
font-size: 32px;
float: left;
margin-right: 29px;}
.features-button-app:active {
border-width: 1px;
background-color: #fff;
border-color: #a8c446;
color: #a8c446;
border-style: solid;}
.features-button-app:hover {
border-width: 1px;
background-color: #fff;
border-color: #a8c446;
color: #a8c446;
border-style: solid;}
.features-button-app:focus {
border-width: 1px;
background-color: #fff;
border-color: #a8c446;
color: #a8c446;
border-style: solid;
outline-color: transparent !important;}
.features-text-app {
line-height:1;
margin-top:0px; !important;
margin-bottom:15% !important;}
Ваши кнопки не включают тип. тип кнопки по умолчанию - submit. Вы хотели сделать это? – Bindrid
Я действительно не очень много знаю о javascript и о том, как это было построено, поэтому я не собирался делать это специально. Что это должно быть? – mpeterson
кажется избыточным, но