The attorney in an action or special proceeding may be changed at any time before judgment or final determination as follows:
1.  Upon his own consent, filed with the clerk, or entered upon the minutes.
2.  Upon the order of the court or judge thereof, upon the application of the client, after notice to the attorney.