webapp/web/js/searchFunctions.js
/**
 * Created by karlpineau on 07/12/2016.
 */
Created by karlpineau on 07/12/2016.
Created by karlpineau on 07 / 12 / 2016 .
function search(value, type) {
    initContent();
    $('#sectionContent').html('<h2 class="text-center" style="margin-top: 10%;"><i class="fa fa-spin fa-5x fa-circle-o-notch" aria-hidden="true"></i></h2>');
    $.ajax({
        url: 'http://zone47.com/tda/api/',
        data: {s: value, type: type},
        dataType: 'json',
        success: function(data) {
            console.log(data);
            loadData(value, data, 'search', null);
        },
        error: function(xhr, status, error) {
            console.log(status + '; ' + error);
        }
    });
}
function search ( value , type ) { initContent ( ) ; $ ( '#sectionContent' ) . html ( '<h2 class="text-center" style="margin-top: 10%;"><i class="fa fa-spin fa-5x fa-circle-o-notch" aria-hidden="true"></i></h2>' ) ; $ . ajax ( { url : 'http://zone47.com/tda/api/' , data : { s : value , type : type } , dataType : 'json' , success : function ( data ) { console . log ( data ) ; loadData ( value , data , 'search' , null ) ; } , error : function ( xhr , status , error ) { console . log ( status + '; ' + error ) ; } } ) ; }
Created by karlpineau on 07/12/2016.
Created by karlpineau on 07 / 12 / 2016 .