Move to CSS: 
```javascript
frame.show();
frame.width('100%').height(800);
```
Actually you can add some class to the element, for instance "rendered", and make some changes in scss file: 
```scss
&.rendered{
    div.lti {
        h2.error_message {
            display: none;
        }
        #ltiLaunchFrame {
            width: 100%;
            height: 800px;
            display: block;
        }
    }
}
```

In this case, instead 5 operations with DOM (find, addClass, show, width, height) will be 1 (addClass).