Difference between revisions of "Template:Sidebar"
Adelo Vieira (talk | contribs) |
Adelo Vieira (talk | contribs) |
||
Line 690: | Line 690: | ||
$('#totalItems, #enteredItems').keyup(function(){ | $('#totalItems, #enteredItems').keyup(function(){ | ||
checkUser() | checkUser() | ||
− | |||
removeCSS() | removeCSS() | ||
− | // This | + | // This functions involved mw-collapsible, which has some problems when adding JS functionalities. So, to make sure |
// this function do what it has to do, we have to ensure that it runs when the DOM is ready. | // this function do what it has to do, we have to ensure that it runs when the DOM is ready. | ||
// Even inside «.ready()» is not working as expected (when we refresh the page, sometimes it works, sometimes it doesn't work). | // Even inside «.ready()» is not working as expected (when we refresh the page, sometimes it works, sometimes it doesn't work). | ||
// So we needed to execute it after a delay: | // So we needed to execute it after a delay: | ||
setTimeout( function() { resaltarSection() }, 1000 ); | setTimeout( function() { resaltarSection() }, 1000 ); | ||
+ | setTimeout( function() { collapseSome() }, 1000 ); | ||
}); | }); | ||
checkUser() | checkUser() | ||
− | |||
removeCSS() | removeCSS() | ||
setTimeout( function() { resaltarSection() }, 1000 ); | setTimeout( function() { resaltarSection() }, 1000 ); | ||
+ | setTimeout( function() { collapseSome() }, 1000 ); | ||
}); | }); | ||
Line 716: | Line 716: | ||
</script> | </script> | ||
}} | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Revision as of 22:07, 19 March 2021