返回信息流木有什么问题了,本来是找了一个星星评分的东西,移植到自己的网页出了问题,然后现在重新找了一个,就好了,顺便推荐一下这个东西
这是一条镜像帖。来源:北邮人论坛 / www-technology / #13577同步于 2011/5/25
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖
请教一个js的问题
kobe6672823
2011/5/25镜像同步3 回复
订阅后,新回复会通过你的通知中心匿名送达。
3 条回复
呃……不太明白。
要是你觉得中文描述起来费劲的话,建议直接上代码来描述问题……
而且……有没有问题,你试一下就知道了。
【 在 kobe6672823 (哆啦B梦) 的大作中提到: 】
: 一个jsA调用了一个htmlB,而这个htmlB调用了jsC这个有问题的吗,急问。。。。百度的话完全不知道用什么关键字搜。。。
starrate,哈哈,我用自己写的插件,只有最基本的功能,1kb。
(function ($) {
$.fn.starrate = function () {
return this.each(function () {
$(this).data("score", 0);
$(this).children("span").removeClass("selected");
$("span", this).mouseenter(function () {
$(this).prevAll().andSelf().addClass("selected");
$(this).nextAll().removeClass("selected");
}).click(function () {
$(this).mouseenter();
$(this).parent().data("score", $(this).index() + 1);
});
$(this).mouseleave(function () {
$(this).children('span').each(function (i) {
if (i >= $(this).parent().data("score"))
$(this).removeClass("selected");
else
$(this).addClass("selected");
});
});
});
};
})(jQuery);