This repository was archived by the owner on Jun 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -175,19 +175,19 @@ Poll.prototype.showPollResults = function(data) {
175175 var count_list = results [ 2 ] ;
176176 var div_id = results [ 3 ] ;
177177
178- this . resultsDiv . html ( "<b>Results:</b><br><br>" ) ;
178+ $ ( this . resultsDiv ) . html ( "<b>Results:</b><br><br>" ) ;
179179
180180 var list = $ ( document . createElement ( "ol" ) ) ;
181181 for ( var i = 0 ; i < opt_list . length ; i ++ ) {
182182 var count = count_list [ i ] ;
183183 var percent = ( count / total ) * 100 ;
184184 var text = Math . round ( 10 * percent ) / 10 + "%" ; // round percent to 10ths
185185
186- var html = "<li value='" + opt_list [ i ] + "'><div class='progress'><div class='progress-bar progress-bar-success' style=width:' " + percent + "' %;><span class='poll-text'>" + text + "</span></div></div></li>" ;
186+ var html = "<li value='" + opt_list [ i ] + "'><div class='progress'><div class='progress-bar progress-bar-success' style=width:" + percent + "%;><span class='poll-text'>" + text + "</span></div></div></li>" ;
187187 var el = $ ( html ) ;
188188 list . append ( el ) ;
189189 }
190- this . resultsDiv . append ( list ) ;
190+ $ ( this . resultsDiv ) . append ( list ) ;
191191} ;
192192
193193Poll . prototype . disableOptions = function ( ) {
@@ -202,7 +202,7 @@ Poll.prototype.checkPollStorage = function() {
202202 var data = { } ;
203203 data . div_id = this . divid ;
204204 data . course = eBookConfig . course ;
205- jQuery . get ( eBookConfig . ajaxURL + "getpollresults" , data , this . showPollResults ) ;
205+ jQuery . get ( eBookConfig . ajaxURL + "getpollresults" , data , this . showPollResults . bind ( this ) ) ;
206206 }
207207} ;
208208
You can’t perform that action at this time.
0 commit comments