joomla-component/site/assets/js/openai.js

30 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-07-26 09:09:42 +00:00
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
const filterResponseItemsByClass = (className) => {
// Get all items with class 'response-item' and hide them
let responseItems = document.querySelectorAll('.getbible-response-item');
responseItems.forEach((item) => {
item.style.display = 'none';
});
// Get all items with the provided class and show them
let filteredItems = document.querySelectorAll(`.${className}`);
filteredItems.forEach((item) => {
item.style.display = 'block';
});
};