nicolasbize/magicsuggest — pull request #30 by meghuizen (2013-04-09 15:10:24+00:00)
Title: Set the MagicSuggest instance on the new element

This sets the MagicSuggest instance on the new placed element.
This is because the new placed element is a different element then the old one.

The following code currently doesn't work:
```JS
$('#' + txtid).magicSuggest({});

// do something with it
$('#' + txtid).magicSuggest().getValue();
```

This is because the new **div.ms-ctn** will replace the old DOM element when initializing. This patch will solve that problem.

You can see the problem in action using the following link: http://jsfiddle.net/8gFLx/