I think you just need to supply the context to the query like so: var popupContent = $('#foo', popupData);
Thatcher On Wed, Aug 20, 2008 at 1:25 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Hi, can anyone tell me how I can get part of a web page downloaded > with $.get()? I thought it would be easy but ohhh no :( Here's a > snippet: > > $("[EMAIL PROTECTED]").click(function() > { > $.get($(this).attr("href"), function(popUpData) > { > var popupContent = $(????); > $.modal(popupContent ); > }); > return false; > }); > > At '????', I basically want to find the contents of a div in popUpData > with an ID of foo as a string I can pass to a modal pop-up. The web > page fetched is HTML 4.01 Strict. > > Thanks for any help, > > Richard > > P.s. $.modal is: http://www.ericmmartin.com/projects/simplemodal/ > -- Christopher Thatcher