We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f55b15b commit 132ec39Copy full SHA for 132ec39
src/featherlight.js
@@ -241,13 +241,12 @@
241
/* sets the content of $instance to $content */
242
setContent: function($content){
243
var self = this;
244
- /* we need a special class for the iframe */
245
- if($content.is('iframe')) {
246
- self.$instance.addClass(self.namespace+'-iframe');
247
- }
248
249
self.$instance.removeClass(self.namespace+'-loading');
250
+ /* we need a special class for the iframe */
+ self.$instance.toggleClass(self.namespace+'-iframe', $content.is('iframe'));
+
251
/* replace content by appending to existing one before it is removed
252
this insures that featherlight-inner remain at the same relative
253
position to any other items added to featherlight-content */
0 commit comments