Jquery implements Sina Weibo's emoticons plug-in

Source: Internet
Author: User
According to Sina Weibo's emoticons plug-in, the plug-in provides an implementation in jquery mode. Features: one-time initialization can be globally controlled (On, off). You can remotely retrieve emoticon data. This allows you to convert emoticon codes. [You can flexibly control the trigger dom.] The initialization code is as follows: $. expBlock. initExp ({/... syntaxHighlighter. all ();

According to Sina Weibo's emoticons plug-in, the plug-in provides an implementation in jquery mode.
Features:
One-time Initialization
Global Control (enable or disable)
You can remotely retrieve emoticon data.
Converts emoticon codes.
[Trigger dom with flexible user control]

The initialization code is as follows:
 
$. ExpBlock. initExp ({

// User expression structure data
ExpData: [{name: 'default', icons: [{url :".. /resources/js/plugins/exp/img/zz2_thumb.gif ", title:" woven "},{ url :".. /resources/js/plugins/exp/img/horse2_thumb.gif ", title:" Shenma "}]
// Contains textarea and emoticon-triggered exp-holder
Holder: '. exp-holder ',
// The textarea input dom in exp-holder. The default value is textarea,
Textarea: 'textea ',
// Trigger dom
Trigger: '. exp-block-trigger ',
// The number of emojis displayed on each page
Kgnum: 5,
// Relative location (absolute) | fixed window (fixed)
PosType: 'absolute ',
// Emoticons
ZIndex: '20140901'

});

Make the expression invalid
$. ExpBlock. disableExp ();

Enable facial expression restart
$. ExpBlock. enableExp ();

// Replace the emoticons of the [Smile] class in the string with tags
Var s = $. expBlock. textFormat (val );


Complete html call example


 

Emotion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.