Git Product home page Git Product logo

Comments (3)

ichord avatar ichord commented on May 30, 2024

oh! That would be great if you can help with wiki pages in English, I'm locked in it.

let me take a look. thanks for your help @apuntovanini

from at.js.

ichord avatar ichord commented on May 30, 2024

@apuntovanini you can override selector method to do some hook by your self. checkout this out ( the last one) . like this

$('.inputor').atwho("@", {
  data: [{id: 1, name: "one", attrn: "attrn"}, {id: 2, name: "two", attrn: "12345"}],
  tpl: "<li data-value='${name}'>${name}</li>"
  callbacks: {
    // What to do after user choose a  <i>List Item</i>
    selector: function ($li) {
      // `this` is the context of At.js plugin class.
      this.replace_str($li.data("value") || "") if $li.length > 0
      // you can get all data of this item in this way
      $li.data('info') // => {id: 2, name: "two", attrn: "12345"} ps. I realize this is ugly. I will do it in a batter way later.
      // and you can add this data to a list or create a inputor to the form
      // but there is a problem that we don't know when the user delete the mentions item...
    }
  }
})

from at.js.

ichord avatar ichord commented on May 30, 2024

#52

from at.js.

Related Issues (20)

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.