Click to reveal more text?
Posted: Tue Jun 19, 2018 3:24 pm
I'm trying to cut down on the amount of boring text on my homepage for customers to scroll past, but at the same time I want the actual text to be there for the sake of Google. Someone suggested to me that I use Jquery to have a short sentence with a click to read more button which reveals text on the same page that was hidden by default. This would make it easy for the customers to scroll past a couple words but for google to see a full page of text.
But how do I do this? I'm practicing the design on a Information page so I can just copy it across to where it goes after it's designed (I'll use an extension which allows me to place text/source on any page/location) but it's simply not working. I've tried this from a tutorial page:
So is there some kind of code I can simply enter into the source? Anyone have other suggestions?
But how do I do this? I'm practicing the design on a Information page so I can just copy it across to where it goes after it's designed (I'll use an extension which allows me to place text/source on any page/location) but it's simply not working. I've tried this from a tutorial page:
But when I go out of source view it ignores my attempted positioning and just shows regular text with no button.<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/j ... "></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").toggle();
});
});
</script>
</head>
<body>
<button>Toggle between hiding and showing the paragraphs</button>
<p>This is a paragraph with little content.</p>
<p>This is another small paragraph.</p>
</body>
</html>
So is there some kind of code I can simply enter into the source? Anyone have other suggestions?