Is it possible to do something like this?
jQuery(selector).jQuery(subselector).command(....)
My code is like this:
$(' .species')
.filter(function () { return !$(this).data('hidden_code_ready'); }
.wrapInner('<span class="species_info" />')
.append('<a href="" class="show_species"></a>')
.data('hidden_code_ready', true)
Now for each of these matched elements (.species) I want to install click handler to the .show_species. I know I can probably do something like:
$('.show_species',
$(' .species')
.filter(function () { return !$(this).data('hidden_code_ready'); }
.wrapInner('<span class="species_info" />')
.append('<a href="" class="show_species"></a>')
.data('hidden_code_ready', true)
).click(...);
but this is really awkward. Is there any possibility to do something like:
$(' .species')
.filter(function () { return !$(this).data('hidden_code_ready'); }
.wrapInner('<span class="species_info" />')
.append('<a href="" class="show_species"></a>')
.data('hidden_code_ready', true)
.jQuery('.show_species').click(....);
???
Preferably working in jQuery 1.3.2 too. Thanks!
Close! The function is called
.find(), notjQuery: