Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
jquery-ellipsis
Advanced tools
simple jquery plugin that excerpts text depending on lines or characters number.
Download using one of the following Methods
$ npm install --save jquery-ellipsis
$ bower install --save ellipsis
please be sure to includejquery >= 2.x
then include ellipsis:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="path/to/jquery.ellipsis.min.js"></script>
ellipsis can be used in two different ways:
via data
attributes.
<p data-toggle="ellipsis" data-type="chars" data-count="150"> Amet id nisi ipsa pariatur eaque aperiam dolorum eius quia, vero provident? Doloremque impedit at cupiditate illum magnam, quo, vel corrupti. Esse voluptates hic vitae porro temporibus temporibus! Possimus rem.</p>
manual way:
<p id="ellipsis_me">Amet id nisi ipsa pariatur eaque aperiam dolorum eius quia, vero provident? Doloremque impedit at cupiditate illum magnam, quo, vel corrupti. Esse voluptates hic vitae porro temporibus temporibus! Possimus rem.</p>
<script>
$(document).ready(function() {
$('#ellipsis_me').ellipsis(options);
});
</script>
option | type | value |
---|---|---|
type | String | determines type is whetherchars or lines number that the text should be excerpted. |
count | Number | determines the number of chars or lines should the text be excerpted. |
event | when |
---|---|
initialize.ellipsis | before the initialization of the plugin |
initialized.ellipsis | after the initialization. |
excerpt.ellipsis | before excerpt the text |
excerpted.ellipsis | after the text being excerpted |
update.ellipsis | before updating when window is resized |
updated.ellipsis | after updating. |
$('#paragraph').on('initialize.ellipsis', function() {
// do some stuff
});
two different types of excerpts by lines/characters
Support re-adjust option later.
different custom event through the life cycle of the plugin.
Destroyable.
data attribute automatic init.
Up comming!
...
FAQs
ellipsis text depending on number of lines or number of chars
The npm package jquery-ellipsis receives a total of 74 weekly downloads. As such, jquery-ellipsis popularity was classified as not popular.
We found that jquery-ellipsis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.