Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Implemented setOptions() function #357

Merged
merged 2 commits into from Aug 1, 2012
Merged

Commits on Jul 17, 2012

  1. Implemented setOptions() function

    Store settings/options in element's data object so that we can change option for each element
    So that we can change settings at anytime
    Following example shows that we can change propertyToSearch and hintText at anytime we want
    Example:
        $(document).ready(function() {
            $(element).tokenInput([{
                        "first_name": "Arthur",
                        "last_name": "Godfrey",
                        "email": "arthur_godfrey@nccu.edu",
                        "url": "https://si0.twimg.com/sticky/default_profile_images/
                    },
                    {
                        "first_name": "Adam",
                        "last_name": "Johnson",
                        "email": "wravo@yahoo.com",
                        "url": "https://si0.twimg.com/sticky/default_profile_images/
                    }], {propertyToSearch: "first_name"}
            );
        });
    
    Later we can do followings at anytime
    $(element).tokenInput("setOptions", {propertyToSearch: 'first_name', hintText: "Type first name here to search"});
        $(element).tokenInput("setOptions", {propertyToSearch: 'last_name', hintText: "Type last name here to search"});
        $(element).tokenInput("setOptions", {propertyToSearch: 'email', hintText: "Type email here to search"});
        $(element).tokenInput("setOptions", {propertyToSearch: 'url', hintText: "Type url here to search"});
    
    Check *Change propertyToSearch anytime* demo in demo.html file
    raihan2006i committed Jul 17, 2012
    Configuration menu
    Copy the full SHA
    576340f View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2012

  1. Merge branch 'master' into setoptions

    Sync 'master' branch of https://github.com/loopj/jquery-tokeninput
    
    Conflicts:
    	demo.html
    	src/jquery.tokeninput.js
    raihan2006i committed Aug 1, 2012
    Configuration menu
    Copy the full SHA
    ab26a77 View commit details
    Browse the repository at this point in the history