Skip to content

srivastava07/limitStringLine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Limit Number of lines in a div

You can limit large string to specified number of lines in a div by this plugin.

Features:

1. It will automatically detect the parent div width and adjust itselft with number of line specified.
2. If the string is larger then it will automatically add dots (...) in the end.
3. It is compatible with all browsers.
4. number of lines can be configured.

Demo

https://plnkr.co/edit/wDsy7ORVbuh94Yfhg9eZ?p=preview

Installation Instruction:

1. Add jQuery in your project
2. Add limitStringLine in your project
3. call the plugin inside document.ready

Uses Example

<script type="text/javascript">
	jQuery(function(){
		 $('.parentDiv').limitStringLine({lineNeeded:3,titleDiv:'.title'});
	});
</script>


<div class="parentDiv col-md-6 row">
	<div class="title col-md-3">
		Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley 
	</div>	
</div>

<div class="parentDiv col-md-6 row">
	<div class="title col-md-3">
		Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC
	</div>
</div>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published