Use the classes and attributes [data-*] to pass data to jQuery:
$('select.selectMenu').each(function () { $(this).selectmenu({ style: 'dropdown', appendTo: $(this).data('target') }); });
It depends on the markup changes, so the selection elements have the correct class and have the [data-target] attributes set for the corresponding values.
<select class="selectMenu" data-target="footer#footer form span"> ...options... </select>
Several options for each and HTML body:
Using the whole data object:
$(this).selectmenu($(this).data()); <select data-style="dropdown" data-append-to="footer#footer form span">
Using a single attribute [data-*] :
$(this).selectmenu($(this).data('selectmenu')); <select data-selectmenu='{"style":"dropdown","appendTo":"footer#footer form span"}'>
source share