Switching stylesheets - specify node type in query selector
authorDarren <darren@darrenwhitlen.com>
Thu, 16 Jan 2014 12:04:05 +0000 (12:04 +0000)
committerDarren <darren@darrenwhitlen.com>
Thu, 16 Jan 2014 12:04:05 +0000 (12:04 +0000)
client/src/views/application.js

index bbbd772ffaaa6691cd87c3daac3893de9c11cf88..9467406480123f4bfb58a0f9fb34fab106afea05 100644 (file)
@@ -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;
         }