Taggd – 用于为图片添加标签的jQuery插件

me87re 9年前

Taggd 一个jQuery插件能够帮助你在一张图片上创建标签。可以有弹出窗。

var options = {        // Aligning the text popups    align: {      x: 'center', // left, center or right      y: 'center'  // top,  center or bottom    },            // The (relative) offset of the popups in pixels    offset: {      left: 0, // horizontal offset      top: 12  // vertical offset    },          // event handlers of the tags    handlers: {            // Any vanilla JavaScript event is a valid key      click: function(e) {        alert('You clicked a button');          this; // the DOM Node        e;    // the Event      },                  // For convenience, you can use strings to      // show, hide and toggle the popups      mouseenter: 'show',      mouseleave: 'hide'    }      };      // The magic comes together here  $('.taggd').taggd( options, data );



项目主页:http://www.open-open.com/lib/view/home/1430731525101