silviomoreto/bootstrap-select — pull request #99 by caseyjhol (2013-04-02 01:57:44+00:00)
Title: Add refresh method

I pulled `render` out of the `reloadLi` function. I also pulled `setSize` out of `render`. I moved the `width` logic into `setSize`. So, now `reloadLi`, `render`, and `setSize` are three separate functions. I then created a `refresh` function that calls all 3 of those functions. So, now when removing/adding any options via javascript, simply call `$('.selectpicker').selectpicker('refresh');` to completely refresh the select and update it with new values. So, I think realistically we could remove line 55 and simply call `refresh` manually, but in any case, I also added DOMNodeRemoved.