What is this plugin for adding ' hot tags '? As shown in the figure below

Source: Internet
Author: User
What are the plugins that add ' hot tags '? As shown in.

Look at the source code, I do not think this is self-developed, it should be plug-in bar, but I can not find specific plug-ins,
You know what to say.
------to solve the idea----------------------
This is more miscellaneous, the search time used to AutoComplete, style to write their own

$ ("#ask-search-tag"). AutoComplete (wd_gettagurl,{
Matchcontains:true,
DELAY:500,
CACHELENGTH:100,
Matchsubset:true,
Minchars:1,
WIDTH:250,
MAX:20,
Extraparams:{type: ' Fastask '},
SCROLLHEIGHT:500,
Parse:function (data) {
Return $.map (eval (data), function (row) {
return {
Data:row,
Value:row.tagname,
Result:row.id,
Result1:row.fave_count,
Result2:row.tagimg
}
});
},
Formatitem:function (row, I, max) {
if (row.id==0) {
Return 'create a ' +row.tagname+ ' topic';
}
if (row.id==-1) {
Return '' +row.tagname+ ' is being audited';
}
if (row.id==-2) {
Return 'please use a topic that already exists';
}
Return '

' +row.tagname+ '

';
}
}). result (Fastaskaddtag);
var addid=1;
function Fastaskaddtag (event,item) {
$ ("#ask-search-tag"). Val (');
if (item.id==-1
------to solve the idea----------------------
Item.id==-2) {
return false;
}
var err_tag=$ ('. Err_tag '); Err_tag.hide ();
var tagcount=$ ("#ask-tags-item div"). length;
if (tagcount>=5) {
Err_tag.text (' Add up to five topics '). Show ();
$ ("#ask-search-tag"). Hide ();
return false;
}
var exists= ';
$ (' #ask-tags-item A[name=removetag] '). each (function () {
if (item.id==$ (this). attr (' data ') && item.id!=0) {
Exists=1;
}
})
$ (' #ask-tags-item span '). each (function () {
if (item.tagname==$ (this). Text ()) {
Exists=1;
}
})
if (exists==1) {
Err_tag.text (' has added this topic '). Show ();
return false;
}
var length=mb_strlen (item.tagname);
var sublen=math.ceil (LENGTH/2);
if (sublen>25) {
Err_tag.text (' topic length can only be 50 characters or 25 kanji '). Show ();
return false;
}
var Addstatus=1;
var addmsg= ';
if (item.id==0) {
$.ajax ({
Type: ' Post ',
Url:wd_addtagbysearchurl,
Async:false,
data:{
Tagname:item.tagname
},
Success:function (res) {
Res=eval ("(" +res+ ")");
addstatus=res[' status '];
addmsg=res[' msg '];
item.id=res[' msg '];
}
});
}
if (addstatus==0) {
if (addmsg== ' login ') {
Showlogin ();
}else{
$ ('. Err_tag '). Text (addmsg);
$ ('. Err_tag '). Show ();
$ ("#ask-search-tag"). Flushcache ();
}
return false;
}
var addhtml= '' +item.tagname+ '';
$ ("#ask-tags-item"). Append (addhtml);
if ((tagcount+1) ==5) {
$ ("#ask-search-tag"). Hide ();
}
$ ("#ask-tags-item A[name=removetag]"). Unbind (' click '). Click (function () {
Removetag ($ (this));
})
}
  • 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.