我有两个这样的功能:
<script type="text/javascript" lang="javascript">
$(document).ready(function() {
$('div').hover(
function() { $('> span', this).show(); },
function() { $('> span', this).hide(); }
);
});
</script>
<script type="text/javascript">
!function(d,s,id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}(document,"script","twitter-wjs");
</script>
<script type="text/javascript" lang="javascript">
$.getJSON("http://twitter.com/statuses/user_timeline/username.json?callback=?&count=5", function(data) {
$.each(data, function(index, value) {
$('.tweets').append('<div id='+data[index].id+'>'+data[index].text+' <span style="display:none"class="hideTweeterIcons"><a href="https://twitter.com/intent/tweet?in_reply_to='+data[index].id+'"><img src="//si0.twimg.com/images/dev/cms/intents/icons/reply.png"></a><a href="https://twitter.com/intent/retweet?tweet_id='+data[index].id+'"><img src="//si0.twimg.com/images/dev/cms/intents/icons/retweet.png"></a><a href="https://twitter.com/intent/favorite?tweet_id='+data[index].id+'"><img src="https://si0.twimg.com/images/dev/cms/intents/icons/favorite.png"></a></span></div><hr>');
});
});
</script>
但是,功能的悬停部分在 Chrome 中不起作用。它在 Firefox 中运行良好。怎么了?我知道 Chrome 有更好的 webkit。怎么了 ?