{"_id":"jquery.shorten","_rev":"3-c4e0a0323637ff2ddc26ddff525dc08e","name":"jquery.shorten","description":"jQuery plugin to automatically shorten text in a DIV and add \"show more\" link.","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"jquery.shorten","version":"1.0.0","description":"jQuery plugin to automatically shorten text in a DIV and add \"show more\" link.","main":"jquery.shorten.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/viralpatel/jquery.shorten.git"},"keywords":["jquery","shorten","show-more","more-link","jquery-plugin","ecosystem:jquery"],"author":{"name":"Viral Patel","email":"viralpatel.net@gmail.com","url":"http://viralpatel.net"},"license":"MIT","bugs":{"url":"https://github.com/viralpatel/jquery.shorten/issues"},"homepage":"https://github.com/viralpatel/jquery.shorten#readme","gitHead":"ffae2fbafe1a738f9586e35bc6149d39485d48c8","_id":"jquery.shorten@1.0.0","_shasum":"60893d80e3eab36b002f966da5346200809c8043","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"viralpatel","email":"viralpatel.net@gmail.com"},"dist":{"shasum":"60893d80e3eab36b002f966da5346200809c8043","tarball":"https://registry.npmjs.org/jquery.shorten/-/jquery.shorten-1.0.0.tgz","integrity":"sha512-49rJlpcyVI/Y2eQRwSexyz6l+fwTKfurO0XttXK4XnG9eQxIuE2Fb4rwNqnsnzStJ8M7ynlhH31fWE9P70B9rg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJuEU52+gvAdYIVC/VRtjlEPvTEszyZnx9WQc1XLKhdgIgPgGZmb27DyoKb3m7FEVZKdDjX1d1SBj3j2Va77mCa2U="}]},"maintainers":[{"name":"viralpatel","email":"viralpatel.net@gmail.com"}]}},"readme":"Shorten\r\n=======\r\n\r\n![jquery shorten plugin](http://img.viralpatel.net/2010/12/show-more-link.png \"jquery shorten plugin\")\r\n\r\nA simple jquery plugin that automatically shortens text within an element and add \"more\" link.\r\n\r\n*Read tutorial: [jQuery Shorten](http://viralpatel.net/blogs/dynamically-shortened-text-show-more-link-jquery/).*\r\n\r\nUsage\r\n-----\r\nShortens the text within 'element' and add a 'more' link.\r\n\r\n    $(element).shorten();\r\n\r\nAdd a link with text 'read more' while shortening the content of element.\r\n\r\n\t$(element).shorten({\r\n\t\tmoreText: 'read more'\r\n\t});\r\n\r\nChange the link text to 'read more' and 'read less' overriding default value 'more' and 'less'.\r\n\r\n\t$(element).shorten({\r\n\t\tmoreText: 'read more',\r\n\t\tlessText: 'read less'\r\n\t});\r\n\r\nOverride default display 100 characters and hide text above 50 characters.\r\n\r\n\t$(element).shorten({\r\n\t\tshowChars: 50,\r\n\t});\r\n\r\nParameters\r\n----------\r\nYou can change the behaviour by changing following js variables.\r\n\r\n| Property       | Description                                                                               |\r\n| -------------- | ----------------------------------------------------------------------------------------- |\r\n| `showChar`     | Total characters to show to user. If the content is more then showChar, it will be split into two halves and first one will be showed to user.                                                                                  |\r\n| `ellipsesText` | The text displayed before “more” link. Default is “…”                                     |\r\n| `moreText`     | The text shown in more link. Default is “more”. You can change to \">>\" or \"read more\"     |\r\n| `lessText`     | The text shown in less link. Default is “less”. You can change to \"<<\" or \"read less\"     |\r\n| `onMore`       | Callback function to trigger when \"more\" is clicked                                       |\r\n| `onLess`       | Callback function to trigger when \"less\" is clicked                                       |\r\n\r\n\r\nLicence\r\n-------\r\n\r\n\tCopyright 2013 Viral Patel and other contributors\r\n\thttp://viralpatel.net\r\n\r\n\tPermission is hereby granted, free of charge, to any person obtaining\r\n\ta copy of this software and associated documentation files (the\r\n\t\"Software\"), to deal in the Software without restriction, including\r\n\twithout limitation the rights to use, copy, modify, merge, publish,\r\n\tdistribute, sublicense, and/or sell copies of the Software, and to\r\n\tpermit persons to whom the Software is furnished to do so, subject to\r\n\tthe following conditions:\r\n\r\n\tThe above copyright notice and this permission notice shall be\r\n\tincluded in all copies or substantial portions of the Software.\r\n\r\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n\tEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n\tMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\n\tNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r\n\tLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r\n\tOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r\n\tWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n","maintainers":[{"name":"viralpatel","email":"viralpatel.net@gmail.com"}],"time":{"modified":"2022-06-19T05:23:57.285Z","created":"2016-01-11T06:30:30.069Z","1.0.0":"2016-01-11T06:30:30.069Z"},"homepage":"https://github.com/viralpatel/jquery.shorten#readme","keywords":["jquery","shorten","show-more","more-link","jquery-plugin","ecosystem:jquery"],"repository":{"type":"git","url":"git+https://github.com/viralpatel/jquery.shorten.git"},"author":{"name":"Viral Patel","email":"viralpatel.net@gmail.com","url":"http://viralpatel.net"},"bugs":{"url":"https://github.com/viralpatel/jquery.shorten/issues"},"license":"MIT","readmeFilename":"README.md"}