Skip to content

Instantly share code, notes, and snippets.

View shenoyranjith's full-sized avatar
🚀
Learning new things!

Ranjith R Shenoy shenoyranjith

🚀
Learning new things!
View GitHub Profile
@shenoyranjith
shenoyranjith / gist:7a6e48cdb8030da573d936b6b64c3749
Last active October 14, 2024 08:57 — forked from skipjac/gist:8783de387d23bf171645
Zendesk Nesty input customization
// Remove the option from the select element
$('#<complete_zendesk_form_field_id> option[value="<zendesk_dropdown_value_tag>"]').remove();
// Callback function to execute when mutations are observed
const callback = function(mutationsList, observer) {
for(let mutation of mutationsList) {
if (mutation.type === 'childList') {
// Remove the option from the nesty-input after it's been created
$('.nesty-panel').children('ul').children().remove('#<zendesk_dropdown_value_tag>');
}