Coder Social home page Coder Social logo

extempl / bootstrap-suggest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lodev09/bootstrap-suggest

0.0 2.0 0.0 2.71 MB

A jQuery plugin for bootstrap that pops-up a dropdown in textarea or input textbox

Home Page: http://lodev09.github.io/bootstrap-suggest/

License: MIT License

JavaScript 100.00%

bootstrap-suggest's Introduction

bootstrap-suggest

A bootstrap plugin for your mention needs.

demo

V2

The version 2 of this plugin now supports bootstrap 4 and contenteditable that uses jquery.caret (optional).

Install

Several quick start options are available:

  • download latest release
  • npm: npm install --save bootstrap-suggest
  • bower: bower install bootstrap-suggest

** Make sure to link bootstrap-suggest.js and bootstrap-suggest.css to your project

Usage

Markup

<div class="form-group">
   <label for="comment">start typing with @</label>
   <textarea class="form-control" rows="5" id="comment"></textarea>
</div>

Data

var users = [
  {username: 'lodev09', fullname: 'Jovanni Lo'},
  {username: 'foo', fullname: 'Foo User'},
  {username: 'bar', fullname: 'Bar User'},
  {username: 'twbs', fullname: 'Twitter Bootstrap'},
  {username: 'john', fullname: 'John Doe'},
  {username: 'jane', fullname: 'Jane Doe'},
];

Init

$('#comment').suggest('@', {
  data: users,
  map: function(user) {
    return {
      value: user.username,
      text: '<strong>'+user.username+'</strong> <small>'+user.fullname+'</small>'
    }
  }
})

API

http://lodev09.github.io/bootstrap-suggest/#api

Feedback

All bugs, feature requests, pull requests, feedback, etc., are welcome. Visit my site at www.lodev09.com.

LICENSE MIT

Credits

© 2018 - Coded by Jovanni Lo / @lodev09

License

Released under the MIT license. See LICENSE file.

LICENSE MIT

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.