How to use Star rating of Font-awesome with Django?

后端 未结 11 1918
挽巷
挽巷 2020-12-23 17:37

Fontawesome has a great star rating css extension, which looks really awesome.

However clicking on any of the span elements wouldn\'t really do anything. I don\'t

11条回答
  •  我在风中等你
    2020-12-23 18:13

    Font Awesome and JQuery DEMO

    HTML

    Rating Star - Function CallBack onChange
    Rating Star - No Editable
    Calificaste con 2.49 de 6 Estrellas
    Rating Star - Tamaño - Data Html options -- Hidden input
    Rating Star - javascript Options - input text
      de 10 estrellas

    JavaScript

     $('#rating_1').RatingStar(
       {callback:function(val){$('#result_1').html("  "+val+" estrella(s).")}}
     );
    
     $('#rating_2').RatingStar();
    
     $('#rating_3').RatingStar();
    
     $('#rating_4').RatingStar({
         val:4.95,
         stars:10,
         input:'#rating_val',
         change:true
     });
    

提交回复
热议问题