From 64391cadb9c590d21e65b403201879260887b545 Mon Sep 17 00:00:00 2001 From: Adam Mesha Date: Tue, 9 Apr 2013 12:50:26 +0300 Subject: [PATCH] Add the custom class to the #facebox element so it can be targeted for styling. --- src/facebox.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/facebox.js b/src/facebox.js index 392adf8..4afc6f8 100644 --- a/src/facebox.js +++ b/src/facebox.js @@ -119,7 +119,7 @@ reveal: function(data, klass) { $(document).trigger('beforeReveal.facebox') - if (klass) $('#facebox .content').addClass(klass) + if (klass) $('#facebox').addClass(klass).find('.content').addClass(klass) $('#facebox .content').empty().append(data) $('#facebox .popup').children().fadeIn('normal') $('#facebox').css('left', $(window).width() / 2 - ($('#facebox .popup').outerWidth() / 2)) @@ -303,7 +303,8 @@ } $(document).unbind('keydown.facebox') $('#facebox').fadeOut(function() { - $('#facebox .content').removeClass().addClass('content') + $('#facebox').removeClass() + .find('.content').removeClass().addClass('content') $('#facebox .loading').remove() $(document).trigger('afterClose.facebox') })