1.0.7 • Published 7 years ago

backbonejs-searchbar v1.0.7

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

BackboneJS Search bar function

The backboneJS searchbar easily implementable. Searches collections and models inside of collections

Basic Usage

The BackboneJS search bar is shipped as a view initially, but you specify options on the fly:

Sample Code

var items = [
        {   name:'test',
            value:'test'
        },
        {
            name:'test2',
            value:'test2'
        }
    ]
    var sb = new Searchbar({
        searchAttr: 'value',
        items:items
    });

// To append to a document on ready    
$(document).ready(function(){
    $('body').append(sb.render());
    $('#testbtn').on('click',function(){
        console.log(sb.getResults());
    });
    sb.onInput(function(e) {
        console.log('inside of callback');
        console.log(e.resultSet);
    })
});
1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago