插件 jQuery.URLive 中文API文档

🌙
手机阅读
本文目录结构

插件 jQuery.URLive 中文API文档 https://github.com/markserbol/urlive

jQuery URLive

URLive is a jquery plugin that helps you create an preview snippet of a url based on the Open Graph properties of the page, similar to a url preview in a facebook post.

The plugin works with any element that has a url content or value, even on <a> tag with href. It is lightweight and doesn’t require any back-end code as data scraping is done asynchronously with AJAX using the Yahoo Query Language (YQL).

jQuery URLive

Demo

You can find the demo at http://markserbol.github.io/urlive/.

Getting Started

Include the latest jQuery library together with jquery.urlive.js and jquery.urlive.css on your documents <head>.

After files inclusion, call urlive() function on the element with the URL you want to show the snippet preview. And pass the selector of the element that will contain the preview.

$('selector').urlive({ container: '.urlive-container' });

You can find the in-depth documentation in the wiki https://github.com/markserbol/urlive/wiki.

License

URLive or jQuery URLive is under MIT License. Use, reproduction, distribution, and modification of this code is subject to the terms and conditions of the MIT license, available at http://www.opensource.org/licenses/MIT.

Changelog

  • v1.1.1 (26 Dec 2014)

    • Fixed relative URL path for images
  • v1.1.0 (28 Oct 2014)

    • Added option regexp
    • Added option yqlSelect
    • Added data- attribute to set or override YQL response data
  • v1.0.4 (14 Apr 2014)

    • Fixed reserved keyword error on IE
  • v1.0.3 (23 Mar 2014)

    • Fixed CSS and design orientation
  • v1.0.2 (24 Feb 2014)

    • Added callback function onClick
    • Added handler to preview snippet click event
  • v1.0.1 (25 Jan 2014)

    • Initial release

AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

于2021年离开前端领域,目前重心放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>

于2021年离开前端领域,目前从事区块链方面工作了