0

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 with it? Thanks.

Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155
ohana
  • 1
  • Do you have a link to your page? I would suspect your javascript file is not present for some reason. – Jage Mar 30 '10 at 19:39
  • Or you can use a [much newer jQuery star rating plugin, with HTML5 and touch support](http://stackoverflow.com/questions/4542883/jquery-star-rating/13176213#13176213). – Dan Dascalescu Nov 05 '12 at 14:16

1 Answers1

5

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.

Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155