I have this string like:
Life is a characteristic distinguishing physical entities having signaling and self-sustaining processes from those that do not,[1][2] either because such functions have ceased (death), or because they lack such functions and are classified as inanimate.[3][4][5] Biology is a science concerned with the study of life.
The smallest contiguous unit of life is called an organism. Organisms are composed of one, or more, cells, undergo metabolism, maintain homeostasis, can grow, respond XXXXXX to stimuli, reproduce and, through evolution, adapt to their environment in successive generations.[1] A diverse array of living organisms can be found in the biosphere of Earth, and the properties common to these organisms—plants, animals, fungi, protists, archaea, and bacteria—are a carbon- and water-based cellular form with complex organization and heritable genetic information.
The Earth was formed about 4.54 billion years ago. The earliest life on Earth existed at least 3.5 billion years ago,[6][7][8] during the Eoarchean Era when sufficient crust had solidified following the molten Hadean Eon. The earliest physical evidence for life on Earth is biogenic graphite in 3.7 billion-year-old metasedimentary rocks discovered in Western Greenland[9] and microbial mat fossils found in 3.48 billion-year-old sandstone discovered in Western Australia.[10][11] Nevertheless, several studies suggest that life on Earth may have XXXXXXXXX started even earlier,[12] as early as 4.25 billion years ago according to one study,[13] and even earlier yet, 4.4 billion years ago, according to another study.[14] The mechanism by which life began on Earth is unknown, although many hypotheses have been formulated. Since emerging, life has evolved into a variety of forms, which biologists have classified into a hierarchy of taxa. Life can survive and thrive in a wide range of conditions.
Though life is confirmed only on the Earth, many think that extraterrestrial life is not only plausible, but probable or inevitable.[15][16] Other planets and moons in the Solar System have been examined for evidence of having once supported simple life, and projects such as SETI have attempted to detect radio transmissions from possible alien civilizations. According to the panspermia hypothesis,
XXXXXXXXXX
microscopic life exists throughout the Universe, and is distributed by meteoroids, asteroids and planetoids.[17]The meaning of life—its significance, origin, purpose, and ultimate fate—is a central concept and question in philosophy and religion. Both philosophy and religion have offered interpretations as to how life relates to existence and consciousness, and on related issues such as life stance, purpose, conception of a god or gods, a soul or an afterlife. Different
XXXXXXXXXXXXX
cultures throughout history have had widely varying approaches to these issues.
I have the following elements:
<input type="button" value="Prev" id="P" name="P">
<input type="button" value="Next" id="N" name="N">
and a Textarea
<textarea id="enterAnyText"></textarea>
When the user clicks on that input #P
, the page should scroll
to the previous XXXXXXXXX
or whatever text they(the user) inserted in the textarea
, with a nice animation.
When the user clicks on that input #N
, the page should scroll
to the next XXXXXXXXX
or whatever text they(the user) inserted in the textarea
, with a nice animation.
The animation
should not be too much fast and should be fluid.
I am running the latest jQuery
version and there is no database.
The text is randomly generated from different story books... so XXXXXXX might signify any word
, string
or text
they want to search inside the randomly generated looong text from a story book.
PLEASE NOTE: The story books are save in .html
files i.e story1.html
, story2.html.
... They are loaded inside divs
using jQuery.load()
EDIT2: We tried to use i.e. jQuery("p:contains(txt)")
but that scrolls to the parent p
tag not the text or word itself
a paragraph like:
The Earth was formed about 4.54 billion years ago. The earliest life on Earth existed at least 3.5 billion years ago,[6][7][8] during the Eoarchean Era when sufficient crust had solidified following the molten Hadean Eon. The earliest physical evidence for life on Earth is biogenic graphite in 3.7 billion-year-old metasedimentary rocks discovered in Western Greenland[9] and microbial mat fossils found in 3.48 billion-year-old sandstone discovered in Western Australia.[10][11] Nevertheless, several studies suggest that life on Earth may have a paragraph like: The Earth was formed about 4.54 billion years ago. The earliest life on Earth existed at least 3.5 billion years ago,[6][7][8] during the Eoarchean Era when sufficient crust had solidified following the molten Hadean Eon. The earliest physical evidence for life on Earth is biogenic graphite in 3.7 billion-year-old metasedimentary rocks discovered in Western Greenland[9] and microbial mat fossils found in 3.48 billion-year-old sandstone discovered in Western Australia.[10][11] Nevertheless, several studies suggest that life on Earth may have a paragraph like: The Earth was formed about 4.54 billion years ago. The earliest life on Earth existed at least 3.5 billion years ago,[6][7][8] during the Eoarchean Era when sufficient crust had solidified following the molten Hadean Eon. The earliest physical evidence for life on Earth is biogenic graphite in 3.7 billion-year-old metasedimentary rocks discovered in Western Greenland[9] and microbial mat fossils found in 3.48 billion-year-old sandstone discovered in Western Australia.[10][11] Nevertheless, several studies suggest that life on Earth may have XXXXXXXXX
will scroll
to the p
but not the XXXXXXXXXXX
Any suggestion is highly praised.