require(['splunkjs/mvc/simplexml/ready!'], function() { require(['splunkjs/ready!', 'splunkjs/mvc'], function(mvc) { // For each button with the class "custom-sub-nav" $('.custom-modal').each(function() { var $btn_group = $(this); /* for each button in this nav with the class "modal": - retrieve the modal window ID from data-modal-name attr of the button - open the modal This trick is required since Splunk 8.0.0 which stripes out the native data-togle Example: