echo '<td> <a href="#" class="btn btn-success add_field">+</a></td>'; if (!$readonly) { echo '<td><a href="#" class="btn btn-danger remove_field">-</a></td>'; } else { echo '<td><i class="fa fa-lock"></i></td>'; } echo '</tr>'; } } else { echo $new_menu_row; } echo '</tbody></table><br/>'; echo '<button class="btn btn-success add_field_button">Add More Fields</button> <input class="btn btn-success" type="submit" name="save_menu_items" value="Save menus">  <input class="btn btn-default" type="submit" name="cancel_edit" value="Cancel">' . ' <input class="btn btn-danger" type="submit" name="reset_menu_items" value="RESET MENUS | REMOVE ALL CUSTOM MENU SETTINGS">'; echo '</form>'; echo '<div style="clear: both;"></div><br/><div><hr/>'; echo module_webnpro_menu_editor::get_select_FontAwesomeIcons('', true); echo '</div>'; ?> <script type="text/javascript"> $(document).ready(function () { // Return a helper with preserved width of cells var fixHelper = function (e, ui) { ui.children().each(function () { $(this).width($(this).width()); }); return ui; }; $("#menu_items tbody").sortable({ helper: fixHelper