Cutting Content By A Number Of Words - CUTTER

Cutting Content By A Number Of Words - CUTTER
File Size: 54.1 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

CUTTER is a jQuery Plugin for Cutting Content By A Number Of Words without changing the markup. Cutter solves the problem when its needed to cut some content by a number of words but its mandatory no lose any markup. 

Basic Usage:

1. Include jQuery Library and CUTTER.js

<script type="text/javascript" src="js/Cutter.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>

2. Call the plugin

<script type="text/javascript">
$(document).ready(function ()
{
	$("#runCutter").click(function ()
	{
		var self = this;
		var oElement = document.getElementById("test");
		Cutter.run(oElement, oElement, 100);
		$(this).hide();
		$(".more").click(function()
		{
$(self).show();
return false;
		})
		return false;
	});
});
</script>

3. Markup

<div id="test">
...
</div>
<a href='#' id='runCutter'>Run Cutter</a>

This awesome jQuery plugin is developed by unknown. For more Advanced Usages, please check the demo page or visit the official website.