Tips for stopping the hidden div from automatically scrolling
To optimize performance, I have decided not to create many .HTML files. Instead, I am putting the page content into a div so that it will display as follows:
<div id="page1"> first page content</div>
<div id="page2"> first page content</div>
<div id="page3"> first page content</div>
<div id="page4"> first page content</div>
However, I encountered an issue where the second page automatically scrolls when I scroll on the first page, even if the second page is hidden.
PAGE 1 - 1
PAGE 1 - 2
PAGE 1 - 3
PAGE 1 - 4
PAGE 1 - 5
PAGE 1 - 6
PAGE 1 - 7
PAGE 1 - 8
PAGE 1 - 9
PAGE 1 - 10
PAGE 1 - 11
PAGE 1 - 12
PAGE 1 - 13
PAGE 1 - 14
PAGE 1 - 15
PAGE 1 - 16
PAGE 1 - 17
PAGE 1 - 18
PAGE 1 - 19
PAGE 1 - 20
PAGE 1 - 21
PAGE 1 - 22
PAGE 1 - 23
PAGE 1 - 24
PAGE 1 - 25
PAGE 1 - 26
PAGE 1 - 27
PAGE 1 - 28
PAGE 1 - 29
PAGE 1 - 30
PAGE 1 - 31
PAGE 1 - 32
PAGE 1 - 33
PAGE 1 - 34
PAGE 1 - 35
PAGE 1 - 36
PAGE 1 - 37
PAGE 1 - 38
PAGE 1 - 39
PAGE 1 - 40
PAGE 1 - 41
PAGE 1 - 42
PAGE 1 - 43
PAGE 1 - 44
PAGE 1 - 45
PAGE 1 - 46
PAGE 1 - 47
PAGE 1 - 48
PAGE 1 - 49
PAGE 1 - 50
PAGE 1 - 51
PAGE 2 - 1
PAGE 2 - 2
PAGE 2 - 3
PAGE 2 - 4
PAGE 2 - 5
PAGE 2 - 6
PAGE 2 - 7
PAGE 2 - 8
PAGE 2 - 9
PAGE 2 - 10
PAGE 2 - 11
PAGE 2 - 12
PAGE 2 - 13
PAGE 2 - 14
PAGE 2 - 15
PAGE 2 - 16
PAGE 2 - 17
PAGE 2 - 18
PAGE 2 - 19
PAGE 2 - 20
PAGE 2 - 21
PAGE 2 - 22
PAGE 2 - 23
PAGE 2 - 24
PAGE 2 - 25
PAGE 2 - 26
PAGE 2 - 27
PAGE 2 - 28
PAGE 2 - 29
PAGE 2 - 30
PAGE 2 - 31
PAGE 2 - 32
PAGE 2 - 33
PAGE 2 - 34
PAGE 2 - 35
PAGE 2 - 36
PAGE 2 - 37
PAGE 2 - 38
PAGE 2 - 39
PAGE 2 - 40
PAGE 2 - 41
PAGE 2 - 42
PAGE 2 - 43
PAGE 2 - 44
PAGE 2 - 45
PAGE 2 - 46
PAGE 2 - 47
PAGE 2 - 48
PAGE 2 - 49
PAGE 2 - 50
PAGE 2 - 51
I understand the solution requires saving the final scrolling point and implementing scroll functions, but with over 30 pages, managing this manually becomes very cumbersome.
In your provided HTML sample, an alternative method is to deal with your comment within the original post:
It may seem complex to save and scroll to the final position when returning to the first page, especially with over 30 pages.
A simpler solution involves: adding a page number attribute to each page element (representing your generated HTML content); creating a key/value object entry; associating the page number as the key and storing the scrollTop value before displaying another page element as the value.
I could use some assistance in understanding how to activate a chrome extension using RSelenium. The extensions are visible in the browser tabs but are not automatically loaded when working with RSelenium.
https://i.sstatic.net/QKqVg.png ...
function displayItem() {
startScene();
THREE.ImageUtils.crossOrigin = "anonymous";
var mtlLoader = new THREE.MTLLoader();
mtlLoader.setTexturePath('https://cdn.rubyrealms.com/textures/');
mtlLoader.setPath('https://cdn.ru ...
As I prepare to transition into the view, I would like the controller to select a random audio file and play it. I'm feeling a bit lost on where to even begin with this task.
Controller:
var audioOne = new Audio("img/1.mp3");
var audioTwo = new Audi ...
I seem to be going in circles and missing something silly...
My setup involves using CodeIgniter on the server-side and Bootstrap on the client, but that's not really the issue here...
I am attempting to access a PHP value within a JavaScript functi ...
My method involves utilizing an ajax call to fetch an htm file that constructs an SVG. Although the call retrieves the file successfully, the designated area where it should display only shows:
https://i.sstatic.net/8G9IU.jpg
Could this issue be related ...
How can I achieve a transition effect from the bg-red-300 class to bg-transparent, or a different background class, over a 2-second duration? Do I need to use javascript for this effect? I would like an element to be highlighted and then return to its no ...
While attempting to install the latest version of @angular-cli on my Mac OS X (El Capitan) using the command sudo npm install -g @angular-cli@latest, I encountered the following error:
Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" ...
Changing text input border color using CSS upon clicking
Hey there!
I have a text field in my HTML:
<input type="text" value="test" id="ff">
Currently, I am using the following CSS to define its border:
#ff {
border: 1px solid #000;
}
I would ...
I am working on a team overview for a company where data such as name, job title, and information are fetched from the database. Due to varying lengths of information, the icons are not aligning properly in one line.
https://i.sstatic.net/cEmKj.png
Does ...
I am working with a component that includes a groupbox:
<fieldset>
<legend>Title</legend>
</fieldset>
Could I change the title of the groupbox using TypeScript code? ...
I am experimenting with Bootstrap to create a customized navbar. I am encountering difficulties in aligning the login and logout buttons to the right. Is there a way to achieve this? I have included my HTML and CSS code below:
HTML code:
<body>
&l ...
I've noticed that without specifying a command to load index.html, webpack is automatically loading the page whenever I make changes in a file.
Below are the attached files: webpack.config.js and package.json
webpack.config.js
var config = {
entry: ...
When working on setting a default value for the db in my CRUD functions for testing purposes, I encountered a peculiar issue that has left me puzzled. Here's the snippet of code that caused the trouble:
import { db } from './firebase'
func ...
(I am a beginner using Next.js + Styled Components and need help :))
I'm currently working on creating a "Netflix" style page, with unique catalog components. Each content item in the grid is a complex component named ContentItem.js that is repeated ...
I recently encountered an issue where I had to add a span element with a specific ID in my HTML code to ensure that clicking on the Reply button would navigate to it. However, this modification was only necessary for the last element on the page. While the ...
Is there a way to access cells from different sheets within a Google spreadsheet? Currently, I am able to access a range of cells from the default first sheet using the following code:
var url = 'https://docs.google.com/spreadsheets/d/' + spread ...
I am currently trying to incorporate the content of a text box into a function call. Here is what I have so far:
<form name="blah">
<input type="text" name="compdate" id="compdate" readonly onClick="GetDate(this);" />
<input type="button" o ...
To edit data, it needs to be displayed in a form.
The primary key in my database table is called id_casting.
Below is the code snippet:
Script :
$(document).on('click', '.edit', function(){
var id = $(this).attr('id&a ...
My dilemma involves sending numerical values to a server using an AJAX call. For instance, numbers like 0.77, 100, and similar variations are being transmitted. However, upon reaching the server, the data is being interpreted differently - 0.77 as a double ...