mark smith
mark smith

Reputation: 20907

Jquery select with select?

Is it possible to select within a select (chaining) with my jQuery?

I basically have this, once i have cloned it, there are 2 more DIVs inside the new clone which I need to change as well using jQuery, these embedded divs have IDs, I could just put it on a new line and reselect using $

But thought jQuery allows chaining, but not show about select in an already selected jQuery expression.. here's my code

        var obligatoryElement = $('#obligatory-template').clone();

        $(obligatoryElement).attr('id', 'accessory-' + obligatory);

        $('#obligatory-template').after(obligatoryElement);

Any ideas?

Upvotes: 0

Views: 130

Answers (1)

Blixt
Blixt

Reputation: 50189

There is the find method:

$('#some-element').find('a')

Upvotes: 2

Related Questions