Skip to content

Commit 132ec39

Browse files
committed
Fix -iframe class for gallery [noelboss#340]
1 parent f55b15b commit 132ec39

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/featherlight.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,12 @@
241241
/* sets the content of $instance to $content */
242242
setContent: function($content){
243243
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-
}
248244

249245
self.$instance.removeClass(self.namespace+'-loading');
250246

247+
/* we need a special class for the iframe */
248+
self.$instance.toggleClass(self.namespace+'-iframe', $content.is('iframe'));
249+
251250
/* replace content by appending to existing one before it is removed
252251
this insures that featherlight-inner remain at the same relative
253252
position to any other items added to featherlight-content */

0 commit comments

Comments
 (0)