Bento box search with multiple targets
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
980 B

Drupal.behaviors.roblib_search_eds = {
attach: function(context, settings) {
$url = settings.roblib_search_eds.search_url;
jQuery.getJSON($url, function(data) {
var items = [];
if(data.length < 1){
jQuery('#' + 'roblib-search-content-eds').empty().append('No Results');
} else {
jQuery.each(data.records, function(key, val) {
items.push('<div class ="roblib-search-row">');
jQuery.each(val.RecordInfo.BibEntity.Titles, function(key2, val2){
items.push('<div class="roblib-title eds">');
items.push(val2.TitleFull+'</div>');
})
items.push('</div>');
});
}
jQuery('#' + 'roblib-search-content-eds').empty().append(items.join(''));
});
}
}