From 77b31a20060247f95442cfbfc0f0fce2f170b362 Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Thu, 8 Dec 2011 20:17:16 -0800 Subject: [PATCH] minor jquery cleanups --- packages/jquery-waypoints/package.js | 1 + packages/liveui/liveui.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/jquery-waypoints/package.js b/packages/jquery-waypoints/package.js index fc79686266..812c344ed2 100644 --- a/packages/jquery-waypoints/package.js +++ b/packages/jquery-waypoints/package.js @@ -2,4 +2,5 @@ Package.describe({ summary: "Execute a function when the user scrolls past an element" }); +Package.require("jquery"); Package.client_file('waypoints.js'); diff --git a/packages/liveui/liveui.js b/packages/liveui/liveui.js index 373be0eda1..3ff3c76af5 100644 --- a/packages/liveui/liveui.js +++ b/packages/liveui/liveui.js @@ -139,6 +139,9 @@ Sky.ui.render = function (render_func, events, event_data) { /// Do a query on 'collection', and replace the children of 'element' /// with the results. /// +/// If jQuery is present, then 'element' may be a jQuery result set, +/// in which case the first element is used. +/// /// options to include: /// query: minimongo selector (default: {}) /// sort: minimongo sort specification (default: natural order) @@ -149,8 +152,6 @@ Sky.ui.render = function (render_func, events, event_data) { /// /// returns an object with: /// stop(): stop updating, tear everything down and let it get GC'd -/// -/// XXX eliminate jQuery dependencies ... Sky.ui.renderList = function (collection, element, options) { if (('$' in window) && (element instanceof $)) // allow element to be a jQuery result set