From 9aa1c5433b930b648f4dc06e9a5bf12fe04ad5cc Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 16 Jan 2014 12:04:05 +0000 Subject: [PATCH] Switching stylesheets - specify node type in query selector --- client/src/views/application.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.25.1