diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 1c1e19ccec7..cb5a6f91aab 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1482,12 +1482,14 @@ function update_progress_bar (id, width, pt, msg, es){ /** * Used in a couple of modules to hide navigation areas when using AJAX + * @deprecated since Moodle 2.7. This function will be removed in Moodle 2.9. */ function hide_item(itemid) { - // use class='hiddenifjs' instead - var item = document.getElementById(itemid); + Y.log('hide_item has been deprecated since Moodle 2.7 and will be removed in Moodle 2.9', + 'warn', 'javascript-static.js'); + var item = Y.one('#' + itemid); if (item) { - item.style.display = "none"; + item.hide(); } }