Giter Site home page Giter Site logo

succinct's People

Contributors

micjamking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

succinct's Issues

Invalid meta

Bower is raising the following warnings:

bower succinct#~1.1.0     invalid-meta succinct is missing "main" entry in bower.json
bower succinct#~1.1.0     invalid-meta succinct is missing "ignore" entry in bower.json

The issue is that grunt cannot automatically generate the de js dependencies in a Yoeman environment.

Can you please add the following to bower.json:

"main": "jQuery.succinct.min.js"

Thanks for your contribution

jQuery 3 support

Doesn't seem to work with jQuery 3. Any thoughts or work-arounds? Thank you!

Destroy succinct

Hi,

Is there any way to destroy succinct? Because I need it just on hover state, so when mouseleave I would like to destroy succinct.

Thanks

Using .succint with a js matchMedia

Nice plugin!

Playing around with .succinct today - calling it from a javascript media query. As the query sets a smaller .succinct size the textDefault truncates nicely. If the query tries to set a larger .succinct size it appears as if the textDefault is no longer based on the original but rather on the current. As a result, the only way to view a larger truncated length is to refresh the browser.

Seems like you figured this out with the live demo input button. It would be great to have a reset we can call into the .succint plugin that works similarly.

Haven't quite figured that out yet though.

Add title attribute?

Handy plugin. It would be more usable if the plugin added a title attribute to the element as soon as text gets truncated. The value of the title attribute is the full text (not truncated). This mimics most browser's default behavior (if text gets truncated by CSS): they show a tooltip on hover displaying the full text string.

Trying to use Succinct on links

Hello,

Im trying to use your great plugin on links. For example if one client have uploaded a file that has a very long name then my application will create a link with a very long text that the end user needs to click in order to open the file.

I would like to use your plugin to shorten that text with "..." but it does seem to work on Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum

What am i doing wrong?
Code im using is
$('.fileLink').succinct({
size: 120
});

Best Regards Ivan

Show Max Characters & How Many Left Are Allowed

It would be nice to be able to show how many characters are allowed, and how many characters remain available. For example, someone would be typing in a textbox to leave a comment, and it would be useful to limit the characters in their comment.

Read more link

I really like the plugin as a matter of fact I will be using for my next project. I realized that succinct only truncates the desired text it doesn't a read more link that can allow readers finish reading the article. I do like to mention that I av not fully checked it out so if the read more function is already there please ignore else please update. Thanks.

Truncate text without spaces

I would love to see a truncate of text without space.
Something like a url can be very long. I have a table with logs and some urls are too long, currently I just get "..." but I would like to see "/home?something=sldvjhsljk..."

Knockout JS binding version?

Hey nice plugin, I was looking over the source code and there does not seem to be any inherent dependency on jquery, so I was wondering if it would be possible to just remove the jquery bits and use normal DOM objects for the element interactions and make a KnockoutJS plugin version?

If you don't want to but dont mind me copying and editing your code I would be happy to make it myself :)

So you could do something like:

<p data-bind="text: Description, succinct: 255">blah blah blah</p>

Demo not working

The demo is not working.

Also it would be helpful if the demo indicated which unit the "size" field expects (which I eventually realized is characters, not lines or px height as I would have expected.)

Allow HTML tags inside truncated elements

Currently, succinct strips out inline HTML tags. The plugin should recognize html tags, and if the closing tag is past the character count for which the text is being truncated, it needs to add the appropriate closing tag back in.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.