4 <div id="brapi_home_traits_div">
7 <button class="btn btn-primary" name="brapi_home_traits_submit" id="brapi_home_traits_submit">Get Traits</button>
9 <div id="brapi_traits_data_result_div">
16 jQuery(document).ready(function() {
17 jQuery("#brapi_home_traits_submit").click(function() {
19 'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/traits',
21 'beforeSend': function() {
22 jQuery('#working_modal').modal('show');
24 'success': function(response) {
25 jQuery('#working_modal').modal('hide');
26 console.log(response);
27 brapi_create_paginated_table(response.result.data, response.metadata.pagination, 'brapi_traits_data_result_div', jQuery('#brapi_home_url_select').val()+'/brapi/v1/traits', undefined);
30 error: function(response) {
31 jQuery('#working_modal').modal('hide');
32 alert('An error occurred');