Q:

If we change the order of a contents then .change() API will not work? 

I am using .change() jquery api to trigger a function when something changes in a textfield .  But it will be triggered if the order changes .  
For example : if the contents are 'a,b' then if it changed to 'b,a' 
Then $('#id').trigger('change') will trigger but i dont want to trigger as those contents are same. 
Any help? 

A:

You would have to store the last value that the textfield contained when the previous change event was triggered.  Then you would have to match the current value to the last value using some custom conditions. 
It look's like what you are comparing are lists of some kind.  You say that for you, ab is no different from ba, so perhaps you'll need to split the textfield's value and make the comparison character by character. 
As @sachleen says, the change is fired when the contents of the element is changed and for jQuery, ab ! = ba so the event is triggered.