From 2e908ec6e5972751ae74ed4f00281e31fab3d37f Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Fri, 5 Dec 2008 05:59:50 +0000 Subject: Read that $("#Selector").length was a good way to check whether an element exists in the DOM/jQuery object. --- themes/default/jquery/jquery.ui.init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/default/jquery/jquery.ui.init.js') diff --git a/themes/default/jquery/jquery.ui.init.js b/themes/default/jquery/jquery.ui.init.js index 97d5f1e3..1806cb10 100644 --- a/themes/default/jquery/jquery.ui.init.js +++ b/themes/default/jquery/jquery.ui.init.js @@ -10,7 +10,7 @@ $("document").ready(function() { * Reset width of sized photos wider than their * parent container so that they fit */ - if ($("#gItem").width()) { + if ($("#gItem").length) { var containerWidth = $("#gItem").width(); var oPhoto = $("#gItem img").filter(function() { return this.id.match(/gPhotoID-/); -- cgit v1.2.3