GithubHelp home page GithubHelp logo

satheesht / multi-line-ellipsis-text Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 1.98 MB

Apply ellipsis on a text and restrict by line, a JQuery plugin

License: MIT License

JavaScript 75.31% HTML 21.83% CSS 2.86%
ellipsis multiline-ellipsis two-line-element-sets line-clamp tooltip count

multi-line-ellipsis-text's Introduction

Multiline Ellipsis for Text

A JQuery plugin to set ellipsis to a text by line count. Converts the text to multiple lines and after the line count reached, it will set ellipsis and set tooltip.

  • Works in and tested in IE and Chrome
  • Tooltip is applied only if ellipsis has set
  • Default line count is 2

Usage

Include libraries

<script type="text/javascript" src="src/multiLineEllipsis.min.js"></script>
<link rel="stylesheet" type="text/css" href="src/css/multiLineEllipsis.css">
$(".threeLineEllipsis").multiLineEllipsis({
    line:3,
    tooltip:true
});

Development

Make changes to .src/ folder and run gulp from root directory, that will make build as per gulpfile.js Note: Make sure to run 'npm install' before running above command

Contributions

I'm just getting started. Please help me to shape this plugin better

License

Released under MIT by, and copyright 2017 by satheesht.

multi-line-ellipsis-text's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.