read more css js

$(document).ready(function(){
		$('div.post div.container').each(function(){
			var Hval = $(this).height();
			var Hval_P = $(this).parent().height();
			if (Hval > Hval_P) {
				$(this).parent().find('div#fade').css({'display':'block'});
				$(this).parent().find('a#more').css({'display':'block'});
			}
		});
		$('a#more').click(function(){
			var Hval = $(this).parent().find('div.container').height();
			var Hval_P = $(this).parent().height();
			if (Hval > (Hval_P+500)) {
				$(this).parent().css({'max-height':Hval_P+500});

				var offset = $(this).offset().top - 150;
				$([document.documentElement, document.body]).animate({
			        scrollTop: offset + 500
			    }, 250);

				$(this).hide();
				$(this).parent().find('a#evenmore').css({'display':'block'});
			}else{
				$(this).parent().css({'max-height':Hval-Hval_P});
				$(this).hide();
				$(this).parent().find('div#fade').css({'display':'none'});
				$(this).parent().find('a#less').css({'display':'block'});
			}
		});
		$('a#evenmore').click(function(){
			var Hval = $(this).parent().find('div.container').height();
			$(this).parent().css({'max-height':Hval});

			var offset = $(this).offset().top - 150;
			$([document.documentElement, document.body]).animate({
			    scrollTop: offset + 500
			}, 250);

			$(this).hide();
			$(this).parent().find('div#fade').css({'display':'none'});
			$(this).parent().find('a#less').css({'display':'block'});
		});
		$('a#less').click(function(){
			$(this).parent().css({'max-height':'300px'});

			var post_P = $(this).parent().offset().top;
			$([document.documentElement, document.body]).animate({
			    scrollTop: post_P
			}, 250);

			$(this).hide();
			$(this).parent().find('div#fade').css({'display':'block'});
			$(this).parent().find('a#more').css({'display':'block'});
		});
	});

0
9
Jezcentral 115 points

                                    .post{
		width: 500px;
		height: auto;
		max-height: 300px; /*whatever you want*/
		margin: auto;
		margin-bottom: 20px;
		padding: 5px 30px 20px 20px;
		position: relative;
		overflow: hidden;
		border: 1px solid rgba(0,0,0,.1);
		font-family: sans-serif;
		transition: all 250ms linear 0ms;
	}
	.container{
		width: 500px;
		height: auto;
		margin: auto;
		padding: 0px;
		position: relative;
		overflow: hidden;
	}
	.post div#fade{
		width: 100%;
		height: 150px;
		margin: auto;
		padding: 0px;
		position: absolute;
		bottom: 0px;
		background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 85%);
		z-index: 1;
		display: none;
	}
	.post a#more{
		position: absolute;
		bottom: 10px;
		right: 20px;
		text-decoration: none;
		color: #4bbfee;
		z-index: 2;
		display: none;
	}
	.post a#less{
		position: absolute;
		bottom: 10px;
		right: 20px;
		text-decoration: none;
		color: #4bbfee;
		z-index: 2;
		display: none;
	}
	.post a#evenmore{
		position: absolute;
		bottom: 10px;
		right: 20px;
		text-decoration: none;
		color: #4bbfee;
		z-index: 2;
		display: none;
	}

0
0
4.67
3

                                    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<div class="post">
	<div class="container">
		<p>Look around, look at what we have. Beauty is everywhere, you only have to look to see it. That's the way I look when I get home late; black and blue. All you have to do is let your imagination go wild. We have a fantastic little sky!</p>

		<p>All kinds of happy little splashes. We don't want to set these clouds on fire. I was blessed with a very steady hand; and it comes in very handy when you're doing these little delicate things. It looks so good, I might as well not stop. We need dark
		in order to show light. I really recommend you use odorless thinner or your spouse is gonna run you right out into the yard and you'll be working by yourself.</p>

		<img src="https://dummyimage.com/200x200/2d5cc2/fff" />

		<p>Van Dyke Brown is a very nice brown, it's almost like a chocolate brown. We're trying to teach you a technique here and how to use it. This present moment is perfect simply due to the fact you're experiencing it.</p>

		<p>If what you're doing doesn't make you happy - you're doing the wrong thing. We spend so much of our life looking - but never seeing. In this world, everything can be happy. Everyone is going to see things differently - and that's the way it should be.
		And just raise cain.</p>

		<p>There's nothing wrong with having a tree as a friend. Maybe there was an old trapper that lived out here and maybe one day he went to check his beaver traps, and maybe he fell into the river and drowned. Tree trunks grow however makes them happy.</p>

		<p>Let your imagination be your guide. You could sit here for weeks with your one hair brush trying to do that - or you could do it with one stroke with an almighty brush. We wash our brush with odorless thinner. Every highlight needs it's own personal
		shadow. Don't kill all your dark areas - you need them to show the light. Working it up and down, back and forth.</p>

		<p>Don't forget to tell these special people in your life just how special they are to you. The only thing worse than yellow snow is green snow. That's why I paint - because I can create the kind of world I want - and I can make this world as happy as
		I want it. Let's build an almighty mountain. You have to make almighty decisions when you're the creator.</p>

		<p>We have a fantastic little sky! Everybody's different. Trees are different. Let them all be individuals. Just go out and talk to a tree. Make friends with it. Go out on a limb - that's where the fruit is. There are no mistakes. You can fix anything
		that happens.</p>

		<p>You have to make those little noises or it won't work. We have no limits to our world. We're only limited by our imagination. I want everbody to be happy. That's what it's all about.</p>

	</div>
	<div id="fade"></div>

	<a href="#" id="more">More information</a>
	<a href="#" id="less">Less information</a>
	<a href="#" id="evenmore">Even more information</a>

</div>

4.67 (3 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
read more css js read more html css js javascript read more css css add readmore html read more expandable text how to show read more option css Read More Read Less Button HTML read more read less button bootstrap responsive read more bootstrap 4 read more read less read more bootstrap paragraph see more css read more button jquery read more text javascript css view more read more show less read more read less javascript read more javascript php javascript read more from list read more javascript js read more button How TO - Read More Read Less Button read mor html code read more button design css simple read more html code bootstrap read more read more in html example jquery read more read less css text see more see more button html css html css js read more how to make a read more in html read more javascript sample resad more javascript sample on click smooth open read more css html read more how t add read more read less to every horizontal card text read less and read more color read more and show less in css view more and view less in js html css read more read more read less css read more button in html and css view more html css js read more read less css text read more how to style read more section in css js read more read less css readmor css readmore css see more read more read leess javascript see more article javascript more text html javascript read more js how to do read more expand how to make read more in javascript read more button css view more view less js show more button readmore in html card having features read less read more button css add see more how to give read more link with css how to give read more link in html jquery read more expand readmore button html read more and read less js read more how to implement read more function in css w2school read more button read more in bootstrap readmore and less more with pararap css examples read more and read less in javascript javascript read more button see more and see less in html card see more html read more paragraph button readmore paragraph button view more button css read more paragraph how to make a read more in p tag in css read more button in div view more javascript javascript read more and less read more text in html readmore read less in bootstrap read more html read more js text is long then how to add read more in html make read more with js read more button on click read more read less function how to make read more in css how to make paragraph read more read more in html div read more in html read more html css read more read less bootstrap 4 card with read more button html jquery read more ..Read more and Read less read more button read more function in javascript view more paragraph html css how to implement read more in html see more css read more read less html how to read more in html html more less section read more and read less in jquery read more and read less using bootstrap how to create read more in html css read more, read less read more less jquery css javascript ... read more read more read less jquery read more readless in jquery how to make see more in css read more button html css how to add a read more in css html less more text add read more button with javascript tutorial read more button js read more javascript with list read more/read less css read more button bootstrap css how to make read more text read more css
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source