jQuery: The Write Less, Do More JavaScript Library

 « Return to Thread: passing this

passing this

by jney :: Rate this Message:

Reply to Author | View in Thread


Hello,

i want to call a function $('#selection').parent.child()

with the following code :

jQuery.fn.extend({
  parent: {
    child: function(o){ doSomethingWith(selectedElement) }
  }
});

but i dont know how to pass the selected element through parent
(#selection) to child function.

regards.

 « Return to Thread: passing this