Note that there are some explanatory texts on larger screens.

plurals
  1. POAutomatically scrolls page up javascript slider (myself created)
    primarykey
    data
    text
    <p>So I created javascript slider, which automatically pulls page up, when it goes to next tab. You can test it in your page, and you will see, how to fix that? It pulls page up, like there would be href="#top" and , but there isn't anything like that.</p> <p>Code -</p> <pre><code> &lt;script type="text/javascript"&gt; jQuery(document).ready(function() { var time = &lt;?php echo $data['tab1_speed']; ?&gt;; var tripleboxTitle = jQuery("triplebox-tab-title"); setInterval(function() { tripleboxTitle.click(function(){ clearInterval(); }); var currentTab = jQuery('.triplebox-tab-active').attr("tab"); var newTab = Number(currentTab)+1; if(newTab &gt; 3) { newTab = 1; } console.log(newTab); jQuery(".triplebox-tab-title").removeClass('triplebox-tab-active'); jQuery('#triplebox-widget-tab'+newTab).addClass('triplebox-tab-active'); jQuery(".triplebox-tab-default").hide(); jQuery(".triplebox-tab-default").removeClass('triplebox-tab-default'); jQuery("#triplebox-widget-tab"+newTab+"-widget").addClass('triplebox-tab-default').fadeIn(300); }, time); }); &lt;/script&gt; &lt;a id="triplebox-widget-tab1" tab="1" class="triplebox-tab-title triplebox-tab-active" &lt;?php if($data['use_color'] == 'default') { ?&gt;style="color: &lt;?php echo $data['color_text']; ?&gt;; background: &lt;?php echo $data['color_tabs']; ?&gt;;" &lt;?php } ?&gt;&gt;&lt;?php echo $data['tab1_name']; ?&gt;&lt;/a&gt; &lt;a id="triplebox-widget-tab2" tab="2" class="triplebox-tab-title" &lt;?php if($data['use_color'] == 'default') { ?&gt;style="color: &lt;?php echo $data['color_text']; ?&gt;; background: &lt;?php echo $data['color_tabs']; ?&gt;;" &lt;?php } ?&gt;&gt;&lt;?php echo $data['tab2_name']; ?&gt;&lt;/a&gt; &lt;a id="triplebox-widget-tab3" tab="3" class="triplebox-tab-title" &lt;?php if($data['use_color'] == 'default') { ?&gt;style="color: &lt;?php echo $data['color_text']; ?&gt;; background: &lt;?php echo $data['color_tabs']; ?&gt;;" &lt;?php } ?&gt;&gt;&lt;?php echo $data['tab3_name']; ?&gt;&lt;/a&gt; &lt;div id="triplebox-widget-tab1-widget" class="triplebox-widget triplebox-tab-default" &lt;?php if($data['use_color'] == 'default') { ?&gt;style="background: &lt;?php echo $data['color_content']; ?&gt;; color: &lt;?php echo $data['color_text']; ?&gt;;"&lt;?php } ?&gt;&gt; &lt;?php echo $content; ?&gt; &lt;/div&gt; &lt;div id="triplebox-widget-tab2-widget" class="triplebox-widget" style=" &lt;?php if($data['use_color'] == 'default') { ?&gt;background: &lt;?php echo $data['color_content']; ?&gt;; color: &lt;?php echo $data['color_text']; ?&gt;;&lt;?php } ?&gt; display: none;"&gt; &lt;?php echo $content2; ?&gt; &lt;/div&gt; &lt;div id="triplebox-widget-tab3-widget" class="triplebox-widget" style=" &lt;?php if($data['use_color'] == 'default') { ?&gt;background: &lt;?php echo $data['color_content']; ?&gt;; color: &lt;?php echo $data['color_text']; ?&gt;;&lt;?php } ?&gt; display: none;"&gt; &lt;?php echo $content3; ?&gt; &lt;/div&gt; </code></pre> <p>Also, why is my clearInterval(); not working? It still continues to scroll. How to make it stop?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload