Skip to content

Instantly share code, notes, and snippets.

@skipjac
Last active August 29, 2015 14:20
Show Gist options
  • Save skipjac/f336f16441300e79ec87 to your computer and use it in GitHub Desktop.
Save skipjac/f336f16441300e79ec87 to your computer and use it in GitHub Desktop.
build to functions to run in a loop with the options you want to show and hide
//make a function to hide options as they are passed into it.
var skip1 = function(k){
$('.nesty-panel').on('DOMNodeInserted', function(e){
$(this).children('ul').children(k).hide();
});
}
// call the function with the option value with a # in front
skip1('#sss_a_1')
//make a function to show the option
var skip = function(k){
$('.nesty-panel').on('DOMNodeInserted', function(e){
$(this).children('ul').children(k).show();
});
}
// call the function with the option value with a # in front
skip('#sss_a_1')
@skipjac
Copy link
Author

skipjac commented May 6, 2015

blend this with the https://github.com/skipjac/Zendesk-Apps/blob/master/conditional-fields-help-center/conditionalFIelds.js app code to call the functions when the watched field options are selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment