开发者

jquery star rating

开发者 https://www.devze.com 2022-12-25 07:35 出处:网络
I\'m using the star rating plugin at http://php.scripts.psu.edu/rja171/widgets/rating.php, but it always complains:

I'm using the star rating plugin at http://php.scripts.psu.edu/rja171/widgets/rating.php,

but it always complains:

stars.lt is not a function

It breaks on this error:

stars.lt(settings.curvalue).addClass('on').end(); 

anyone know what's wrong wi开发者_C百科th it? Thanks.


That plugin uses an extremely old version of jQuery (over 3 years), the .lt() method no longer exists.

You can update the plugin to work though, replace these 2 spots in the file (lines 136 & 144):

  • .lt(index) with .slice(0,index)
  • .lt(settings.curvalue) with .slice(0, settings.curvalue)

That should get you going, see a working updated version here.

0

精彩评论

暂无评论...
验证码 换一张
取 消