function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AichaSFAichaSF 

visualforce page - double clic

How can I block double clicks on my visualforce page?
I use this function

   <div id="jRateSmiley" style="margin:auto;text-align:center"></div>
$jquery("#jRateSmiley").jRateSmiley({
                                                startColor: 'orange',
                                                endColor: '#62EC8B',
                                                precision : 1,
                                                rating : defaultValue,
                                                count : 3,
                                                shape : 'STAR',
                                                readOnly : {!isReadOnly},
                                                onChange: function(rating) {
                                                    //var theValue = (rating*2);
                                                    var theValue = (rating);
                                                    // Remplace le texte
                                                    replaceText(theValue);
                                                },
                                                onSet: function(rating) {
                                                    //var theValue = (rating*2);
                                                    var theValue = (rating);                        
                                                    // Appel côté contrôleur
                                                    editSatisfaction(theValue);
                                                }
                                            });                                 
                                            
                                        }
                                        
                                        function replaceText(theValue){
                                            var theLabel = '{!$Label.Labs_Sf_Your_Rating_Label}';
                                            theLabel = theLabel.replace('#',theValue );
                                            $jquery('#onchange-value').text(theLabel);
                                        }