Calling ReadLine in body.
<script>
let readLine = new ReadLine({
showPercentage:true,
id:"target",
height: "4px",
color: "#00b8e6"
});
//destroying the readline-js
readLine.destroy();
</script>
You can call this function in head also.
<script>
window.onload=function(){
new ReadLine({
id: "target",
height: "3px",
color: "red"
});
};
</script>
In React js
import Readline from 'readline-js';
...
useEffect(() => {
let readline = new Readline({
height: "3px",
color: "red"
})
return ()=>{
readline.destroy();
}
})
id(optional): id of the targeted content / Default whole
body
showPercentage(optional): show percentage of content covered (slow in mobile)
height(optional): height of line / Default 6px
color(optional): color of line (rgb/rbga) / Default blue
.destroy(): Use this method on the readline object created to destroy or remove it
Calling ReadLine in body.
<script>
ReadLine({
showPercentage:true,
id:"target",
height: "4px",
color: "#00b8e6"
});
</script>
You can call this function in head also.
<script>
window.onload=function(){
ReadLine({
id: "target",
height: "3px",
color: "red"
});
};
</script>
id(optional): id of the targeted content / Default whole
body
showPercentage(optional): show percentage of content covered (slow in mobile)
height(optional): height of line / Default 6px
color(optional): color of line (rgb/rbga) / Default blue