From: Darren Date: Thu, 16 Jan 2014 12:04:05 +0000 (+0000) Subject: Switching stylesheets - specify node type in query selector X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9aa1c5433b930b648f4dc06e9a5bf12fe04ad5cc;p=KiwiIRC.git Switching stylesheets - specify node type in query selector --- diff --git a/client/src/views/application.js b/client/src/views/application.js index bbbd772..9467406 100644 --- a/client/src/views/application.js +++ b/client/src/views/application.js @@ -70,13 +70,13 @@ _kiwi.view.Application = Backbone.View.extend({ theme_name = theme_name.toLowerCase(); // Clear any current theme - $('[data-theme]:not([disabled])').each(function (idx, link) { + $('link [data-theme]:not([disabled])').each(function (idx, link) { var $link = $(link); $link.attr('rel', 'alternate ' + $link.attr('rel')).attr('disabled', true)[0].disabled = true; }); // Apply the new theme - var link = $('[data-theme][title=' + theme_name + ']'); + var link = $('link [data-theme][title=' + theme_name + ']'); if (link.length > 0) { link.attr('rel', 'stylesheet').attr('disabled', false)[0].disabled = false; }