From: Mike Taylor Date: Thu, 8 May 2014 14:13:23 +0000 (+0100) Subject: Abstract all-widgets selector out into new function selectorForAllWidgets X-Git-Tag: 1.0.0~702 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=8f5f3f601c14fe4d0af684edc1ad0b2989e9d39e;p=mkws-moved-to-github.git Abstract all-widgets selector out into new function selectorForAllWidgets --- diff --git a/src/mkws-core.js b/src/mkws-core.js index 4c9db87..8abdeda 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -427,8 +427,12 @@ mkws.pagerNext = function(tname) { } + function selectorForAllWidgets() { + return '[class^="mkws"],[class*=" mkws"]'; + } + function makeWidgetsWithin(level, node) { - node.find('[class^="mkws"],[class*=" mkws"]').each(function() { + node.find(selectorForAllWidgets()).each(function() { handleNodeWithTeam(this, function(tname, type) { var myTeam = mkws.teams[tname]; if (!myTeam) {