Last active
February 22, 2016 19:29
-
-
Save klhall1987/f4359cbc77038c73af3f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*This is the function the line of code is in. It starts on line 258 in the current code base. | |
*The The file path is ../ninja-forms-multi-part/js/dev/ninja-forms-mp-display.js | |
*You will need to re-minify the js and replace the minified js file located in ../ninja-forms-multi-part/js/min/ninja-forms-mp-display.js | |
* After you have made the changes. | |
*/ | |
function ninja_forms_update_progressbar( form_id, current_page ){ | |
var mp_settings = window['ninja_forms_form_' + form_id + '_mp_settings']; | |
var page_count = mp_settings.page_count; | |
if( current_page == 1 ){ | |
var percent = 0; | |
}else if( current_page == ( page_count + 1 ) ){ | |
percent = 100; | |
}else{ | |
current_page--; //This is the line of code I removed. It is on line 266 in the current code base. | |
var percent = current_page / page_count; | |
percent = Math.ceil( percent * 100 ); | |
} | |
jQuery("#ninja_forms_form_" + form_id + "_progress_bar").find("span").css( "width", percent + "%" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment