Skip to content

Commit

Permalink
Corrected: Add step to for loop to cut out redundant looping and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hughbris committed Feb 26, 2016
1 parent 47a4085 commit 13f5c4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/js/jquery-ui-slider-pips.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,8 @@
collection += createPip("first");

// for every stop in the slider; we create a pip.
for ( p = 1; p < pips; p++ ) {
if ( p % slider.options.pipStep === 0 ) {
for ( p = slider.options.pipStep; p < pips; p = p + slider.options.pipStep ) {
collection += createPip( p );
}
}

// create our last pip
Expand Down

0 comments on commit 13f5c4f

Please sign in to comment.