We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sorry for my english on chapter 13 when adding eventlistener 'sortupdate' fetch query sends every run on cycle:
sortable('#course-modules', { forcePlaceholderSize: true, placeholderClass: 'placeholder' })[0].addEventListener('sortupdate', function(e) { modulesOrder = {}; var modules = document.querySelectorAll('#course-modules li'); modules.forEach(function (module, index) { modulesOrder[module.dataset.id] = index; module.querySelector('.order').innerHTML = index + 1; options['body'] = JSON.stringify(modulesOrder); fetch(moduleOrderUrl, options); }); });
. it is not right. Right:
sortable('#course-modules', { forcePlaceholderSize: true, placeholderClass: 'placeholder' })[0].addEventListener('sortupdate', function(e) { modulesOrder = {}; var modules = document.querySelectorAll('#course-modules li'); modules.forEach(function (module, index) { modulesOrder[module.dataset.id] = index; module.querySelector('.order').innerHTML = index + 1; }); options['body'] = JSON.stringify(modulesOrder); fetch(moduleOrderUrl, options); });
fetch query must be send when cycle is finish!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sorry for my english
on chapter 13 when adding eventlistener 'sortupdate' fetch query sends every run on cycle:
. it is not right.
Right:
fetch query must be send when cycle is finish!
The text was updated successfully, but these errors were encountered: