Coder Social home page Coder Social logo

Comments (5)

nashio avatar nashio commented on July 26, 2024

Hi @binskeep , can you elaborate a bit more?. Not sure what you mean by the previous initialRating.
There's only one initialRating, the one you use to load the first time.

from star-rating-svg.

binskeep avatar binskeep commented on July 26, 2024

User case: I have a 'read only' starRating that displays the average of everyones starRating. I have another starRating that allows the operator to enter the operator's starRating. When the ajax call returns from the updating the operator's starRating, I need to update the 'read only' starRating. It has already been initialized and displayed. However I need to be able to update the 'read only' with the new average. I ended up unloading and erasing the 'read only' starRating, then rebuilding a new 'read only' starRating. It would be nice to allow updating the initialRating after it's been loaded.

from star-rating-svg.

nashio avatar nashio commented on July 26, 2024

I get you now, good point. I'm gonna add a new method to update the current rating.

from star-rating-svg.

nashio avatar nashio commented on July 26, 2024

@binskeep Added a couple of new methods, let me know if that works for you

// set rating example  
$('your-selector').starRating('setRating', 2.5)  
// get rating example  
$('your-selector').starRating('getRating')  

from star-rating-svg.

binskeep avatar binskeep commented on July 26, 2024

Hi Nashio,
I just downloaded v1.0.1 That did the trick. I don't have to unload/reload the plugin. Thanks!

from star-rating-svg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.