0
我正在使用此code來查詢/搜索Twitter。Jquery Twitter搜索API - 無結果
有時我的查詢沒有結果。如果查詢沒有結果,我想顯示一行文本。鏈接到我的網頁是here.
我試過使用jQuery:空,但它沒有工作。
我真的很感謝一些幫助。
感謝,
布蘭頓
我正在使用此code來查詢/搜索Twitter。Jquery Twitter搜索API - 無結果
有時我的查詢沒有結果。如果查詢沒有結果,我想顯示一行文本。鏈接到我的網頁是here.
我試過使用jQuery:空,但它沒有工作。
我真的很感謝一些幫助。
感謝,
布蘭頓
它看起來像你的鏈接第九實例具有如何處理沒有結果的查詢的例子。
jQuery(function($){
$("#empty").tweet({
avatar_size: 32,
count: 4,
query: rnd,
loading_text: "searching twitter..."
}).bind("empty", function() { $(this).append("No matching tweets found"); });
});
在你的具體的例子,你會怎麼做:
jquery.tweet.js 221線$(".sunday").tweet({
avatar_size: 48,
loading_text: "searching twitter...",
query: "#sunday from:Runs4Coffee OR from:mariaCBS13 OR from:Da_BEvans OR from:benhemmen OR from:brittany_franco OR from:BellaCMarlyn OR from:carlynveenkant OR from:HannibalsHood OR from:DirtCheapChickn OR from:RealKenyelAli OR from:RyeBeezy OR from:JaelynnDaSinger OR from:magichat OR from:Arabnblack OR from:statweestics OR from:mikegamboa04 OR from:Barnettrainer OR from:lahinke OR from:ParamountUK OR from:ryssaroo OR from:thewalkinmyth"
}).bind("empty", function() { $(this).append("No matching tweets found"); });
});
前:
var tweets = $.map(data.results || data, extract_template_data);
放像
if(data.results.length===0){
$('#elementToDisplayNoItemsText').html('No items found');
}
大感謝您。我應該看到這一點。 – Brendon