thank you Mike ! Now, i don't actually want to display the loaded content, just need to traverse it, and generate a submenu (one <a> element per <h3> element found, using the h3 element attributes). Can i actually load it inside a variable?
On Mon, Dec 29, 2008 at 10:47 PM, Mike Alsup <mal...@gmail.com> wrote: > >> say i have a html file containing a #viewPort div, with a series of >> divs each containing an h4 tag. >> >> If the file was not external, i would simply select what i need like this: >> >> $('#dsViewport h3'); >> >> Now, it is an external file, so my question is: is it possible to >> load this file via $.load("myfile.php#dsViewport h3"); or is the >> syntax different, or not possible at all ? >> >> Thank you for your insight, >> >> Alexandre > > I believe the syntax you need is this: > > $('#someElement').load("myfile.php #dsViewport h3"); > > The first space delimits the url. Everything after that is a > selector. > >