Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igorsgm/ed0373edb2a883431e16dff7146c414c to your computer and use it in GitHub Desktop.
Save igorsgm/ed0373edb2a883431e16dff7146c414c to your computer and use it in GitHub Desktop.
/**
* Função para setar elementos previamente selecionadas
*/
function setListsOfItem() {
js(document).one("ajaxStop", function () {
js('input:hidden.listas').each(function () {
var name = js(this).attr('name');
if (name.indexOf('listashidden')) {
js('#jform_listas option[value="' + js(this).val() + '"]').attr('selected', true);
}
});
js("#jform_listas").trigger("liszt:updated");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment