quarks
quarks

Reputation: 35276

Assigning ID to a widget using GQuery

I need to wrap a widget with an ID, so I used GQuery to do that, like so:

GQuery g = $(signupButton);
g.id("signupButton");

Now I need to get the instance of the actual Button or Widget using the GQuery object, is that possible?

Will the g.get(0) return the wrapped instance of that Button/Widget?

Upvotes: 0

Views: 63

Answers (1)

jdramaix
jdramaix

Reputation: 1104

use the widget() method

Button b = g.widget();

//later if you want to query your button via its id
Button b = $("#signupButton").widget()

Julien

Upvotes: 1

Related Questions