Grid Results

Code example how to initialize GridResults widget...

        var searchResults = $("#searchResults")
            .gridresults({
                pageSize: 5,
                onResultsReady: function(e, csids) {
                    //  all results (list of ChemSpider IDs) are ready and can be additionaly processed here...
                },
                onClick: function (event, csid) {
                    //  Get CSID of the compound that was clicked in search results list...
                }
            });
    
... and display search results.
        $("#simpleSearch").simplesearch({
            onBeforeSearch: function () {
                $('#searchBox').searchProgress();
            },
            onSearchDone: function (event, rid) {
                searchResults.gridresults("showResultsByRID", rid);
            }
        });