views:

40

answers:

1

for example, if I have:

var $target = $("div#target");

and then, I would like to pass this jquery object $target to another javascript function I defined myself, like:

 function f(xml, $div_t)
  {

  }

inside the function f, is there someway I can retrieve the original div's ID from the object $div_t?

+5  A: 
$div_t.attr("id")
jarrett