suppose you could ask for an array of div's like:

   obj->get_me _all_divs() ; // --> gives an array with div elements

Or:

      $.ajax({
           type: "GET",
           url: 'myxml.xml',
           dataType: 'xml',
           success: function(xml){
               alert( $("body", xml) ) ; // this cannot be done!!
           }
       }) ;

(In this case xml is een XML object and this doesn't work)

or

      $.ajax({
           type: "GET",
           url: 'myhtml.html',
           dataType: 'html',
           success: function(text){    // 'text' is a string
               alert( $("body", text) ) ; // this doesn't seem to work
too
           }
       }) ;


On Sep 7, 10:58 pm, Michael Geary <m...@mg.to> wrote:
> You need to explain a little more about what you want. If you've created an
> object of your own, I don't think it will have "div" elements in it, will
> it? What *is* in your object, and what do you want to happen when you
> iterate over it? Could you give a complete specific example, with the actual
> object that you want to use and the results you're looking for?
> -Mike
>
> On Mon, Sep 7, 2009 at 1:04 PM, jeanluca <lca...@gmail.com> wrote:
>
> > Hi All
>
> > I need some help with the following:
>
> > Suppose I have the following object
>
> > var obj = new XYZ() ;
>
> > Now I want to do:
>
> > $("div", obj).each(function(){.....}) ;
>
> > Now, of course, jquery will throw an error because it doesn't know
> > what to do with 'obj'. So I want to add/extend jquery, so it knows how
> > to treat 'obj'.  Can this be done ? Is there documentation explaining
> > how to do this ?
>
> > thnx a lot
> > LuCa

Reply via email to